mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
exposed objectAt in deque, and fixed toInteger bug
This commit is contained in:
parent
9fe347aafc
commit
214c399537
@ -131,6 +131,16 @@ friend class nsDequeIterator;
|
|||||||
*/
|
*/
|
||||||
void* Peek(void);
|
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
|
* Remove all items from container without destroying them
|
||||||
@ -240,17 +250,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
nsDeque& operator=(const nsDeque& anOther);
|
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;
|
result=-result;
|
||||||
break;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
|
|||||||
nsAutoString a("foobar");
|
nsAutoString a("foobar");
|
||||||
nsAutoString b("foo");
|
nsAutoString b("foo");
|
||||||
nsAutoString c(".5111");
|
nsAutoString c(".5111");
|
||||||
|
nsAutoString d(" 5");
|
||||||
PRInt32 result=a.Compare(b);
|
PRInt32 result=a.Compare(b);
|
||||||
PRInt32 result2=result;
|
PRInt32 result2=result;
|
||||||
result=c.ToInteger(&result2);
|
result=c.ToInteger(&result2);
|
||||||
|
result=d.ToInteger(&result2);
|
||||||
result2=result;
|
result2=result;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -664,7 +664,10 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
|||||||
result=-result;
|
result=-result;
|
||||||
break;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
|
|||||||
nsAutoString a("foobar");
|
nsAutoString a("foobar");
|
||||||
nsAutoString b("foo");
|
nsAutoString b("foo");
|
||||||
nsAutoString c(".5111");
|
nsAutoString c(".5111");
|
||||||
|
nsAutoString d(" 5");
|
||||||
PRInt32 result=a.Compare(b);
|
PRInt32 result=a.Compare(b);
|
||||||
PRInt32 result2=result;
|
PRInt32 result2=result;
|
||||||
result=c.ToInteger(&result2);
|
result=c.ToInteger(&result2);
|
||||||
|
result=d.ToInteger(&result2);
|
||||||
result2=result;
|
result2=result;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -131,6 +131,16 @@ friend class nsDequeIterator;
|
|||||||
*/
|
*/
|
||||||
void* Peek(void);
|
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
|
* Remove all items from container without destroying them
|
||||||
@ -240,17 +250,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
nsDeque& operator=(const nsDeque& anOther);
|
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;
|
result=-result;
|
||||||
break;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
|
|||||||
nsAutoString a("foobar");
|
nsAutoString a("foobar");
|
||||||
nsAutoString b("foo");
|
nsAutoString b("foo");
|
||||||
nsAutoString c(".5111");
|
nsAutoString c(".5111");
|
||||||
|
nsAutoString d(" 5");
|
||||||
PRInt32 result=a.Compare(b);
|
PRInt32 result=a.Compare(b);
|
||||||
PRInt32 result2=result;
|
PRInt32 result2=result;
|
||||||
result=c.ToInteger(&result2);
|
result=c.ToInteger(&result2);
|
||||||
|
result=d.ToInteger(&result2);
|
||||||
result2=result;
|
result2=result;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -664,7 +664,10 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
|||||||
result=-result;
|
result=-result;
|
||||||
break;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -2066,9 +2069,11 @@ void nsString::SelfTest(void) {
|
|||||||
nsAutoString a("foobar");
|
nsAutoString a("foobar");
|
||||||
nsAutoString b("foo");
|
nsAutoString b("foo");
|
||||||
nsAutoString c(".5111");
|
nsAutoString c(".5111");
|
||||||
|
nsAutoString d(" 5");
|
||||||
PRInt32 result=a.Compare(b);
|
PRInt32 result=a.Compare(b);
|
||||||
PRInt32 result2=result;
|
PRInt32 result2=result;
|
||||||
result=c.ToInteger(&result2);
|
result=c.ToInteger(&result2);
|
||||||
|
result=d.ToInteger(&result2);
|
||||||
result2=result;
|
result2=result;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user