diff --git a/mozilla/base/src/nsString.cpp b/mozilla/base/src/nsString.cpp index fc7aac58e72..fcd8f1e8946 100644 --- a/mozilla/base/src/nsString.cpp +++ b/mozilla/base/src/nsString.cpp @@ -944,7 +944,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) const { * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) { +PRInt32 nsString::Insert(const 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) { diff --git a/mozilla/base/src/nsString.h b/mozilla/base/src/nsString.h index f97450a72e6..8470857e5ca 100644 --- a/mozilla/base/src/nsString.h +++ b/mozilla/base/src/nsString.h @@ -462,7 +462,7 @@ PRInt32 Right(nsString& aCopy,PRInt32 aCount) const; * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); +PRInt32 Insert(const nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); /** * Insert a single unicode char into this string at diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index fc7aac58e72..fcd8f1e8946 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -944,7 +944,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) const { * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) { +PRInt32 nsString::Insert(const 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) { diff --git a/mozilla/string/obsolete/nsString.h b/mozilla/string/obsolete/nsString.h index f97450a72e6..8470857e5ca 100644 --- a/mozilla/string/obsolete/nsString.h +++ b/mozilla/string/obsolete/nsString.h @@ -462,7 +462,7 @@ PRInt32 Right(nsString& aCopy,PRInt32 aCount) const; * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); +PRInt32 Insert(const nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); /** * Insert a single unicode char into this string at diff --git a/mozilla/xpcom/ds/nsString.cpp b/mozilla/xpcom/ds/nsString.cpp index fc7aac58e72..fcd8f1e8946 100644 --- a/mozilla/xpcom/ds/nsString.cpp +++ b/mozilla/xpcom/ds/nsString.cpp @@ -944,7 +944,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) const { * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) { +PRInt32 nsString::Insert(const 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) { diff --git a/mozilla/xpcom/ds/nsString.h b/mozilla/xpcom/ds/nsString.h index f97450a72e6..8470857e5ca 100644 --- a/mozilla/xpcom/ds/nsString.h +++ b/mozilla/xpcom/ds/nsString.h @@ -462,7 +462,7 @@ PRInt32 Right(nsString& aCopy,PRInt32 aCount) const; * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); +PRInt32 Insert(const nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); /** * Insert a single unicode char into this string at diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp index fc7aac58e72..fcd8f1e8946 100644 --- a/mozilla/xpcom/string/obsolete/nsString.cpp +++ b/mozilla/xpcom/string/obsolete/nsString.cpp @@ -944,7 +944,7 @@ PRInt32 nsString::Right(nsString& aCopy,PRInt32 aCount) const { * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 nsString::Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount) { +PRInt32 nsString::Insert(const 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) { diff --git a/mozilla/xpcom/string/obsolete/nsString.h b/mozilla/xpcom/string/obsolete/nsString.h index f97450a72e6..8470857e5ca 100644 --- a/mozilla/xpcom/string/obsolete/nsString.h +++ b/mozilla/xpcom/string/obsolete/nsString.h @@ -462,7 +462,7 @@ PRInt32 Right(nsString& aCopy,PRInt32 aCount) const; * @param aCount -- number of chars to be copied from aCopy * @return number of chars inserted into this. */ -PRInt32 Insert(nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); +PRInt32 Insert(const nsString& aCopy,PRInt32 anOffset,PRInt32 aCount=-1); /** * Insert a single unicode char into this string at