зеркало из https://github.com/mozilla/gecko-dev.git
Made nsString::Insert actually support the count=-1 default argument
This commit is contained in:
Родитель
50e5afb598
Коммит
9be7e3e15f
|
@ -939,6 +939,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) {
|
|||
*/
|
||||
PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) {
|
||||
aCount=(aCount>aCopy.mLength) ? aCopy.mLength : aCount; //don't try to copy more than you are given
|
||||
if (aCount < 0) aCount = aCopy.mLength;
|
||||
if(0<=anOffset) {
|
||||
if(aCount>0) {
|
||||
|
||||
|
|
|
@ -939,6 +939,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) {
|
|||
*/
|
||||
PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) {
|
||||
aCount=(aCount>aCopy.mLength) ? aCopy.mLength : aCount; //don't try to copy more than you are given
|
||||
if (aCount < 0) aCount = aCopy.mLength;
|
||||
if(0<=anOffset) {
|
||||
if(aCount>0) {
|
||||
|
||||
|
|
|
@ -939,6 +939,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) {
|
|||
*/
|
||||
PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) {
|
||||
aCount=(aCount>aCopy.mLength) ? aCopy.mLength : aCount; //don't try to copy more than you are given
|
||||
if (aCount < 0) aCount = aCopy.mLength;
|
||||
if(0<=anOffset) {
|
||||
if(aCount>0) {
|
||||
|
||||
|
|
|
@ -939,6 +939,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) {
|
|||
*/
|
||||
PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) {
|
||||
aCount=(aCount>aCopy.mLength) ? aCopy.mLength : aCount; //don't try to copy more than you are given
|
||||
if (aCount < 0) aCount = aCopy.mLength;
|
||||
if(0<=anOffset) {
|
||||
if(aCount>0) {
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче