exposed objectAt in deque, and fixed toInteger bug

This commit is contained in:
rickg%netscape.com 1999-01-15 19:20:51 +00:00
Родитель c45b15cee6
Коммит af405928a0
8 изменённых файлов: 46 добавлений и 28 удалений

Просмотреть файл

@ -16,7 +16,7 @@
* Reserved.
*/
#include "nsDeque.h"
#include "nsCRT.h"

Просмотреть файл

@ -131,6 +131,16 @@ friend class nsDequeIterator;
*/
void* Peek(void);
/**
* method used to retrieve ptr to
* ith member in container. DOesn't remove
* that item.
*
* @update gess4/18/98
* @param index of desired item
* @return ptr to ith element in list
*/
void* ObjectAt(int anIndex) const;
/**
* Remove all items from container without destroying them
@ -240,17 +250,6 @@ private:
*/
nsDeque& operator=(const nsDeque& anOther);
/**
* PRIVATE method used to retrieve ptr to
* ith member in container. DOesn't remove
* that item.
*
* @update gess4/18/98
* @param index of desired item
* @return ptr to ith element in list
*/
void* ObjectAt(int anIndex) const;
};
/******************************************************

Просмотреть файл

@ -664,7 +664,10 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
result=-result;
break;
}
else if('+'==theChar) {
else if('+'==theChar) { //stop in a good state if you see this...
break;
}
else if(' '==theChar){ //stop in a good state if you see this...
break;
}
else{
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
nsAutoString a("foobar");
nsAutoString b("foo");
nsAutoString c(".5111");
nsAutoString d(" 5");
PRInt32 result=a.Compare(b);
PRInt32 result2=result;
result=c.ToInteger(&result2);
result=d.ToInteger(&result2);
result2=result;
#if 0

Просмотреть файл

@ -664,7 +664,10 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
result=-result;
break;
}
else if('+'==theChar) {
else if('+'==theChar) { //stop in a good state if you see this...
break;
}
else if(' '==theChar){ //stop in a good state if you see this...
break;
}
else{
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
nsAutoString a("foobar");
nsAutoString b("foo");
nsAutoString c(".5111");
nsAutoString d(" 5");
PRInt32 result=a.Compare(b);
PRInt32 result2=result;
result=c.ToInteger(&result2);
result=d.ToInteger(&result2);
result2=result;
#if 0

Просмотреть файл

@ -16,7 +16,7 @@
* Reserved.
*/
#include "nsDeque.h"
#include "nsCRT.h"

Просмотреть файл

@ -131,6 +131,16 @@ friend class nsDequeIterator;
*/
void* Peek(void);
/**
* method used to retrieve ptr to
* ith member in container. DOesn't remove
* that item.
*
* @update gess4/18/98
* @param index of desired item
* @return ptr to ith element in list
*/
void* ObjectAt(int anIndex) const;
/**
* Remove all items from container without destroying them
@ -240,17 +250,6 @@ private:
*/
nsDeque& operator=(const nsDeque& anOther);
/**
* PRIVATE method used to retrieve ptr to
* ith member in container. DOesn't remove
* that item.
*
* @update gess4/18/98
* @param index of desired item
* @return ptr to ith element in list
*/
void* ObjectAt(int anIndex) const;
};
/******************************************************

Просмотреть файл

@ -664,7 +664,10 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
result=-result;
break;
}
else if('+'==theChar) {
else if('+'==theChar) { //stop in a good state if you see this...
break;
}
else if(' '==theChar){ //stop in a good state if you see this...
break;
}
else{
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
nsAutoString a("foobar");
nsAutoString b("foo");
nsAutoString c(".5111");
nsAutoString d(" 5");
PRInt32 result=a.Compare(b);
PRInt32 result2=result;
result=c.ToInteger(&result2);
result=d.ToInteger(&result2);
result2=result;
#if 0

Просмотреть файл

@ -664,7 +664,10 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
result=-result;
break;
}
else if('+'==theChar) {
else if('+'==theChar) { //stop in a good state if you see this...
break;
}
else if(' '==theChar){ //stop in a good state if you see this...
break;
}
else{
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
nsAutoString a("foobar");
nsAutoString b("foo");
nsAutoString c(".5111");
nsAutoString d(" 5");
PRInt32 result=a.Compare(b);
PRInt32 result2=result;
result=c.ToInteger(&result2);
result=d.ToInteger(&result2);
result2=result;
#if 0