зеркало из https://github.com/mozilla/pjs.git
fix of Patch for Bug 75081: nsCString::FindChar is stupid. Extremely stupid
Patch by bratell@lysator.liu.se Fix by Henry.Jia@sun.com r=jag, sr=alecf
This commit is contained in:
Родитель
a91d8eb112
Коммит
016fa29739
|
@ -468,7 +468,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
|
|||
|
||||
if(aEliminateLeading) {
|
||||
while(++theIndex<=theMax) {
|
||||
PRUnichar theChar=GetCharAt(aDest, theIndex);
|
||||
PRUnichar theChar=::GetCharAt(aDest, theIndex);
|
||||
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
|
||||
if(kNotFound==thePos)
|
||||
break;
|
||||
|
@ -489,7 +489,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
|
|||
theIndex=aDest.mLength;
|
||||
PRInt32 theNewLen=theIndex;
|
||||
while(--theIndex>=0) {
|
||||
PRUnichar theChar=GetCharAt(aDest, theIndex); //read at end now...
|
||||
PRUnichar theChar=::GetCharAt(aDest, theIndex); //read at end now...
|
||||
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
|
||||
if(kNotFound<thePos)
|
||||
theNewLen=theIndex;
|
||||
|
|
|
@ -468,7 +468,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
|
|||
|
||||
if(aEliminateLeading) {
|
||||
while(++theIndex<=theMax) {
|
||||
PRUnichar theChar=GetCharAt(aDest, theIndex);
|
||||
PRUnichar theChar=::GetCharAt(aDest, theIndex);
|
||||
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
|
||||
if(kNotFound==thePos)
|
||||
break;
|
||||
|
@ -489,7 +489,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
|
|||
theIndex=aDest.mLength;
|
||||
PRInt32 theNewLen=theIndex;
|
||||
while(--theIndex>=0) {
|
||||
PRUnichar theChar=GetCharAt(aDest, theIndex); //read at end now...
|
||||
PRUnichar theChar=::GetCharAt(aDest, theIndex); //read at end now...
|
||||
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
|
||||
if(kNotFound<thePos)
|
||||
theNewLen=theIndex;
|
||||
|
|
Загрузка…
Ссылка в новой задаче