diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index 92624c14d6b..88368c38cd8 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -219,16 +219,6 @@ nsCString::SetCapacity( PRUint32 aNewCapacity ) Accessor methods... *********************************************************************/ -/** - * Retrieves internal (1-byte) buffer ptr; - * @update gess1/4/99 - * @return ptr to internal buffer - */ -const char* nsCString::GetBuffer(void) const { - return mStr; -} - - /** * set a char inside this string at given index * @param aChar is the char you want to write into this string diff --git a/mozilla/string/obsolete/nsString.h b/mozilla/string/obsolete/nsString.h index 4ab205c2b29..27977a64594 100644 --- a/mozilla/string/obsolete/nsString.h +++ b/mozilla/string/obsolete/nsString.h @@ -137,7 +137,9 @@ public: /** * Retrieve const ptr to internal buffer; DO NOT TRY TO FREE IT! */ - const char* GetBuffer(void) const; + const char* GetBuffer() const { return get(); } // to be deprecated, prefer |get()| + + const char* get() const { return mStr; } PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex); diff --git a/mozilla/xpcom/ds/nsString.cpp b/mozilla/xpcom/ds/nsString.cpp index 92624c14d6b..88368c38cd8 100644 --- a/mozilla/xpcom/ds/nsString.cpp +++ b/mozilla/xpcom/ds/nsString.cpp @@ -219,16 +219,6 @@ nsCString::SetCapacity( PRUint32 aNewCapacity ) Accessor methods... *********************************************************************/ -/** - * Retrieves internal (1-byte) buffer ptr; - * @update gess1/4/99 - * @return ptr to internal buffer - */ -const char* nsCString::GetBuffer(void) const { - return mStr; -} - - /** * set a char inside this string at given index * @param aChar is the char you want to write into this string diff --git a/mozilla/xpcom/ds/nsString.h b/mozilla/xpcom/ds/nsString.h index 4ab205c2b29..27977a64594 100644 --- a/mozilla/xpcom/ds/nsString.h +++ b/mozilla/xpcom/ds/nsString.h @@ -137,7 +137,9 @@ public: /** * Retrieve const ptr to internal buffer; DO NOT TRY TO FREE IT! */ - const char* GetBuffer(void) const; + const char* GetBuffer() const { return get(); } // to be deprecated, prefer |get()| + + const char* get() const { return mStr; } PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex); diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp index 92624c14d6b..88368c38cd8 100644 --- a/mozilla/xpcom/string/obsolete/nsString.cpp +++ b/mozilla/xpcom/string/obsolete/nsString.cpp @@ -219,16 +219,6 @@ nsCString::SetCapacity( PRUint32 aNewCapacity ) Accessor methods... *********************************************************************/ -/** - * Retrieves internal (1-byte) buffer ptr; - * @update gess1/4/99 - * @return ptr to internal buffer - */ -const char* nsCString::GetBuffer(void) const { - return mStr; -} - - /** * set a char inside this string at given index * @param aChar is the char you want to write into this string diff --git a/mozilla/xpcom/string/obsolete/nsString.h b/mozilla/xpcom/string/obsolete/nsString.h index 4ab205c2b29..27977a64594 100644 --- a/mozilla/xpcom/string/obsolete/nsString.h +++ b/mozilla/xpcom/string/obsolete/nsString.h @@ -137,7 +137,9 @@ public: /** * Retrieve const ptr to internal buffer; DO NOT TRY TO FREE IT! */ - const char* GetBuffer(void) const; + const char* GetBuffer() const { return get(); } // to be deprecated, prefer |get()| + + const char* get() const { return mStr; } PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex);