From 6669673d26bebcc17ed355e2d62fb4e02b628db5 Mon Sep 17 00:00:00 2001 From: "waterson@netscape.com" Date: Thu, 7 Jan 1999 22:19:57 +0000 Subject: [PATCH] Made the aCopy parameter to nsString::Insert const to clear up some compiler warnings. a=rickg. --- base/src/nsString.cpp | 2 +- base/src/nsString.h | 2 +- string/obsolete/nsString.cpp | 2 +- string/obsolete/nsString.h | 2 +- xpcom/ds/nsString.cpp | 2 +- xpcom/ds/nsString.h | 2 +- xpcom/string/obsolete/nsString.cpp | 2 +- xpcom/string/obsolete/nsString.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/src/nsString.cpp b/base/src/nsString.cpp index fc7aac58e721..fcd8f1e89469 100644 --- a/base/src/nsString.cpp +++ b/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/base/src/nsString.h b/base/src/nsString.h index f97450a72e65..8470857e5ca1 100644 --- a/base/src/nsString.h +++ b/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/string/obsolete/nsString.cpp b/string/obsolete/nsString.cpp index fc7aac58e721..fcd8f1e89469 100644 --- a/string/obsolete/nsString.cpp +++ b/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/string/obsolete/nsString.h b/string/obsolete/nsString.h index f97450a72e65..8470857e5ca1 100644 --- a/string/obsolete/nsString.h +++ b/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/xpcom/ds/nsString.cpp b/xpcom/ds/nsString.cpp index fc7aac58e721..fcd8f1e89469 100644 --- a/xpcom/ds/nsString.cpp +++ b/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/xpcom/ds/nsString.h b/xpcom/ds/nsString.h index f97450a72e65..8470857e5ca1 100644 --- a/xpcom/ds/nsString.h +++ b/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/xpcom/string/obsolete/nsString.cpp b/xpcom/string/obsolete/nsString.cpp index fc7aac58e721..fcd8f1e89469 100644 --- a/xpcom/string/obsolete/nsString.cpp +++ b/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/xpcom/string/obsolete/nsString.h b/xpcom/string/obsolete/nsString.h index f97450a72e65..8470857e5ca1 100644 --- a/xpcom/string/obsolete/nsString.h +++ b/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