diff --git a/string/obsolete/nsString.cpp b/string/obsolete/nsString.cpp index 37be74d2a6c..98354eddee4 100644 --- a/string/obsolete/nsString.cpp +++ b/string/obsolete/nsString.cpp @@ -898,6 +898,7 @@ nsCString& nsCString::Assign(char aChar) { return Append(aChar); } +#ifndef NEW_STRING_APIS /** * WARNING! THIS IS A VERY SPECIAL METHOD. * This method "steals" the contents of aSource and hands it to aDest. @@ -916,7 +917,7 @@ nsCString& nsCString::operator=(nsSubsumeCStr& aSubsumeString) { #endif // AIX return *this; } - +#endif /** * append given string to this string diff --git a/string/obsolete/nsString.h b/string/obsolete/nsString.h index 449423952f7..171204067af 100644 --- a/string/obsolete/nsString.h +++ b/string/obsolete/nsString.h @@ -420,28 +420,33 @@ public: * @param aString: string to be added to this * @return this */ - nsCString& operator=(const nsCString& aString) {return Assign(aString);} - nsCString& operator=(const nsStr& aString) {return Assign(aString);} nsCString& operator=(PRUnichar aChar) {return Assign(aChar);} nsCString& operator=(char aChar) {return Assign(aChar);} - nsCString& operator=(const char* aCString) {return Assign(aCString);} nsCString& operator=(const PRUnichar* aString) {return Assign(aString);} + +#ifndef NEW_STRING_APIS + nsCString& operator=(const nsCString& aString) {return Assign(aString);} + nsCString& operator=(const nsStr& aString) {return Assign(aString);} + nsCString& operator=(const char* aCString) {return Assign(aCString);} #ifdef AIX nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX requires a const here #else nsCString& operator=(nsSubsumeCStr& aSubsumeString); #endif +#endif /** * Here's a bunch of methods that append varying types... * @param various... * @return this */ - nsCString& operator+=(const nsCString& aString){return Append(aString,(PRInt32)aString.mLength);} - nsCString& operator+=(const char* aCString) {return Append(aCString);} nsCString& operator+=(const PRUnichar aChar){return Append(aChar);} nsCString& operator+=(const char aChar){return Append(aChar);} nsCString& operator+=(const int anInt){return Append(anInt,10);} +#ifndef NEW_STRING_APIS + nsCString& operator+=(const nsCString& aString){return Append(aString,(PRInt32)aString.mLength);} + nsCString& operator+=(const char* aCString) {return Append(aCString);} +#endif /* * Appends n characters from given string to this, diff --git a/string/obsolete/nsString2.cpp b/string/obsolete/nsString2.cpp index c552636972f..1565df86da4 100644 --- a/string/obsolete/nsString2.cpp +++ b/string/obsolete/nsString2.cpp @@ -1028,6 +1028,7 @@ nsString& nsString::Assign(PRUnichar aChar) { return Append(aChar); } +#ifndef NEW_STRING_APIS /** * WARNING! THIS IS A VERY SPECIAL METHOD. * This method "steals" the contents of aSource and hands it to aDest. @@ -1046,7 +1047,7 @@ nsString& nsString::operator=(const nsSubsumeStr& aSubsumeString) { #endif // AIX return *this; } - +#endif /** * append given string to this string; diff --git a/string/obsolete/nsString2.h b/string/obsolete/nsString2.h index 9394ed50383..49ca7973ad4 100644 --- a/string/obsolete/nsString2.h +++ b/string/obsolete/nsString2.h @@ -235,6 +235,7 @@ public: PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex); +#ifndef NEW_STRING_APIS /********************************************************************** String concatenation methods... *********************************************************************/ @@ -274,6 +275,7 @@ public: * @return newly created string */ nsSubsumeStr operator+(PRUnichar aChar); +#endif /********************************************************************** Lexomorphic transforms... @@ -464,34 +466,38 @@ public: * @param aString: string to be added to this * @return this */ - nsString& operator=(const nsString& aString) {return Assign(aString);} - nsString& operator=(const nsStr& aString) {return Assign(aString);} nsString& operator=(char aChar) {return Assign(aChar);} nsString& operator=(PRUnichar aChar) {return Assign(aChar);} nsString& operator=(const char* aCString) {return Assign(aCString);} + +#ifndef NEW_STRING_APIS + nsString& operator=(const nsString& aString) {return Assign(aString);} + nsString& operator=(const nsStr& aString) {return Assign(aString);} nsString& operator=(const PRUnichar* aString) {return Assign(aString);} #ifdef AIX nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX requires a const here #else nsString& operator=(nsSubsumeStr& aSubsumeString); #endif +#endif /** * Here's a bunch of methods that append varying types... * @param various... * @return this */ - nsString& operator+=(const nsStr& aString){return Append(aString,(PRInt32)aString.mLength);} - nsString& operator+=(const nsString& aString){return Append(aString,(PRInt32)aString.mLength);} nsString& operator+=(const char* aCString) {return Append(aCString);} nsString& operator+=(const char aChar) { return Append((PRUnichar) (unsigned char)aChar); } - - nsString& operator+=(const PRUnichar* aUCString) {return Append(aUCString);} nsString& operator+=(const PRUnichar aChar){return Append(aChar);} nsString& operator+=(const int anInt){return Append(anInt,10);} +#ifndef NEW_STRING_APIS + nsString& operator+=(const nsStr& aString){return Append(aString,(PRInt32)aString.mLength);} + nsString& operator+=(const nsString& aString){return Append(aString,(PRInt32)aString.mLength);} + nsString& operator+=(const PRUnichar* aUCString) {return Append(aUCString);} +#endif /* * Appends n characters from given string to this, * This version computes the length of your given string diff --git a/string/public/nsAReadableString.h b/string/public/nsAReadableString.h index 3b8209e4bbd..b803765e649 100644 --- a/string/public/nsAReadableString.h +++ b/string/public/nsAReadableString.h @@ -38,7 +38,8 @@ #include // for |bidirectional_iterator_tag| -#include +#include + // for |min|, |copy| /* diff --git a/string/public/nsAWritableString.h b/string/public/nsAWritableString.h index cab014fb615..6a9106e4b0d 100644 --- a/string/public/nsAWritableString.h +++ b/string/public/nsAWritableString.h @@ -321,7 +321,6 @@ class basic_nsAWritableString } }; -NS_DEF_STRING_COMPARISONS(basic_nsAWritableString) template typename basic_nsAWritableString::WritingIterator diff --git a/string/public/nsCharTraits.h b/string/public/nsCharTraits.h index 87092790af4..bf44eb689bd 100644 --- a/string/public/nsCharTraits.h +++ b/string/public/nsCharTraits.h @@ -24,7 +24,8 @@ #ifndef _nsCharTraits_h__ #define _nsCharTraits_h__ -#include +#include + // for |EOF|, |WEOF| #include // for |memcpy|, et al @@ -330,6 +331,7 @@ struct nsCharTraits #endif }; +#if 0 NS_SPECIALIZE_TEMPLATE struct nsCharTraits { @@ -454,5 +456,6 @@ struct nsCharTraits // static state_type get_state( pos_type ); #endif }; +#endif #endif // !defined(_nsCharTraits_h__) diff --git a/xpcom/ds/nsAReadableString.h b/xpcom/ds/nsAReadableString.h index 3b8209e4bbd..b803765e649 100644 --- a/xpcom/ds/nsAReadableString.h +++ b/xpcom/ds/nsAReadableString.h @@ -38,7 +38,8 @@ #include // for |bidirectional_iterator_tag| -#include +#include + // for |min|, |copy| /* diff --git a/xpcom/ds/nsAWritableString.h b/xpcom/ds/nsAWritableString.h index cab014fb615..6a9106e4b0d 100644 --- a/xpcom/ds/nsAWritableString.h +++ b/xpcom/ds/nsAWritableString.h @@ -321,7 +321,6 @@ class basic_nsAWritableString } }; -NS_DEF_STRING_COMPARISONS(basic_nsAWritableString) template typename basic_nsAWritableString::WritingIterator diff --git a/xpcom/ds/nsCharTraits.h b/xpcom/ds/nsCharTraits.h index 87092790af4..bf44eb689bd 100644 --- a/xpcom/ds/nsCharTraits.h +++ b/xpcom/ds/nsCharTraits.h @@ -24,7 +24,8 @@ #ifndef _nsCharTraits_h__ #define _nsCharTraits_h__ -#include +#include + // for |EOF|, |WEOF| #include // for |memcpy|, et al @@ -330,6 +331,7 @@ struct nsCharTraits #endif }; +#if 0 NS_SPECIALIZE_TEMPLATE struct nsCharTraits { @@ -454,5 +456,6 @@ struct nsCharTraits // static state_type get_state( pos_type ); #endif }; +#endif #endif // !defined(_nsCharTraits_h__) diff --git a/xpcom/ds/nsString.cpp b/xpcom/ds/nsString.cpp index 37be74d2a6c..98354eddee4 100644 --- a/xpcom/ds/nsString.cpp +++ b/xpcom/ds/nsString.cpp @@ -898,6 +898,7 @@ nsCString& nsCString::Assign(char aChar) { return Append(aChar); } +#ifndef NEW_STRING_APIS /** * WARNING! THIS IS A VERY SPECIAL METHOD. * This method "steals" the contents of aSource and hands it to aDest. @@ -916,7 +917,7 @@ nsCString& nsCString::operator=(nsSubsumeCStr& aSubsumeString) { #endif // AIX return *this; } - +#endif /** * append given string to this string diff --git a/xpcom/ds/nsString.h b/xpcom/ds/nsString.h index 449423952f7..171204067af 100644 --- a/xpcom/ds/nsString.h +++ b/xpcom/ds/nsString.h @@ -420,28 +420,33 @@ public: * @param aString: string to be added to this * @return this */ - nsCString& operator=(const nsCString& aString) {return Assign(aString);} - nsCString& operator=(const nsStr& aString) {return Assign(aString);} nsCString& operator=(PRUnichar aChar) {return Assign(aChar);} nsCString& operator=(char aChar) {return Assign(aChar);} - nsCString& operator=(const char* aCString) {return Assign(aCString);} nsCString& operator=(const PRUnichar* aString) {return Assign(aString);} + +#ifndef NEW_STRING_APIS + nsCString& operator=(const nsCString& aString) {return Assign(aString);} + nsCString& operator=(const nsStr& aString) {return Assign(aString);} + nsCString& operator=(const char* aCString) {return Assign(aCString);} #ifdef AIX nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX requires a const here #else nsCString& operator=(nsSubsumeCStr& aSubsumeString); #endif +#endif /** * Here's a bunch of methods that append varying types... * @param various... * @return this */ - nsCString& operator+=(const nsCString& aString){return Append(aString,(PRInt32)aString.mLength);} - nsCString& operator+=(const char* aCString) {return Append(aCString);} nsCString& operator+=(const PRUnichar aChar){return Append(aChar);} nsCString& operator+=(const char aChar){return Append(aChar);} nsCString& operator+=(const int anInt){return Append(anInt,10);} +#ifndef NEW_STRING_APIS + nsCString& operator+=(const nsCString& aString){return Append(aString,(PRInt32)aString.mLength);} + nsCString& operator+=(const char* aCString) {return Append(aCString);} +#endif /* * Appends n characters from given string to this, diff --git a/xpcom/ds/nsString2.cpp b/xpcom/ds/nsString2.cpp index c552636972f..1565df86da4 100644 --- a/xpcom/ds/nsString2.cpp +++ b/xpcom/ds/nsString2.cpp @@ -1028,6 +1028,7 @@ nsString& nsString::Assign(PRUnichar aChar) { return Append(aChar); } +#ifndef NEW_STRING_APIS /** * WARNING! THIS IS A VERY SPECIAL METHOD. * This method "steals" the contents of aSource and hands it to aDest. @@ -1046,7 +1047,7 @@ nsString& nsString::operator=(const nsSubsumeStr& aSubsumeString) { #endif // AIX return *this; } - +#endif /** * append given string to this string; diff --git a/xpcom/ds/nsString2.h b/xpcom/ds/nsString2.h index 9394ed50383..49ca7973ad4 100644 --- a/xpcom/ds/nsString2.h +++ b/xpcom/ds/nsString2.h @@ -235,6 +235,7 @@ public: PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex); +#ifndef NEW_STRING_APIS /********************************************************************** String concatenation methods... *********************************************************************/ @@ -274,6 +275,7 @@ public: * @return newly created string */ nsSubsumeStr operator+(PRUnichar aChar); +#endif /********************************************************************** Lexomorphic transforms... @@ -464,34 +466,38 @@ public: * @param aString: string to be added to this * @return this */ - nsString& operator=(const nsString& aString) {return Assign(aString);} - nsString& operator=(const nsStr& aString) {return Assign(aString);} nsString& operator=(char aChar) {return Assign(aChar);} nsString& operator=(PRUnichar aChar) {return Assign(aChar);} nsString& operator=(const char* aCString) {return Assign(aCString);} + +#ifndef NEW_STRING_APIS + nsString& operator=(const nsString& aString) {return Assign(aString);} + nsString& operator=(const nsStr& aString) {return Assign(aString);} nsString& operator=(const PRUnichar* aString) {return Assign(aString);} #ifdef AIX nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX requires a const here #else nsString& operator=(nsSubsumeStr& aSubsumeString); #endif +#endif /** * Here's a bunch of methods that append varying types... * @param various... * @return this */ - nsString& operator+=(const nsStr& aString){return Append(aString,(PRInt32)aString.mLength);} - nsString& operator+=(const nsString& aString){return Append(aString,(PRInt32)aString.mLength);} nsString& operator+=(const char* aCString) {return Append(aCString);} nsString& operator+=(const char aChar) { return Append((PRUnichar) (unsigned char)aChar); } - - nsString& operator+=(const PRUnichar* aUCString) {return Append(aUCString);} nsString& operator+=(const PRUnichar aChar){return Append(aChar);} nsString& operator+=(const int anInt){return Append(anInt,10);} +#ifndef NEW_STRING_APIS + nsString& operator+=(const nsStr& aString){return Append(aString,(PRInt32)aString.mLength);} + nsString& operator+=(const nsString& aString){return Append(aString,(PRInt32)aString.mLength);} + nsString& operator+=(const PRUnichar* aUCString) {return Append(aUCString);} +#endif /* * Appends n characters from given string to this, * This version computes the length of your given string diff --git a/xpcom/string/obsolete/nsString.cpp b/xpcom/string/obsolete/nsString.cpp index 37be74d2a6c..98354eddee4 100644 --- a/xpcom/string/obsolete/nsString.cpp +++ b/xpcom/string/obsolete/nsString.cpp @@ -898,6 +898,7 @@ nsCString& nsCString::Assign(char aChar) { return Append(aChar); } +#ifndef NEW_STRING_APIS /** * WARNING! THIS IS A VERY SPECIAL METHOD. * This method "steals" the contents of aSource and hands it to aDest. @@ -916,7 +917,7 @@ nsCString& nsCString::operator=(nsSubsumeCStr& aSubsumeString) { #endif // AIX return *this; } - +#endif /** * append given string to this string diff --git a/xpcom/string/obsolete/nsString.h b/xpcom/string/obsolete/nsString.h index 449423952f7..171204067af 100644 --- a/xpcom/string/obsolete/nsString.h +++ b/xpcom/string/obsolete/nsString.h @@ -420,28 +420,33 @@ public: * @param aString: string to be added to this * @return this */ - nsCString& operator=(const nsCString& aString) {return Assign(aString);} - nsCString& operator=(const nsStr& aString) {return Assign(aString);} nsCString& operator=(PRUnichar aChar) {return Assign(aChar);} nsCString& operator=(char aChar) {return Assign(aChar);} - nsCString& operator=(const char* aCString) {return Assign(aCString);} nsCString& operator=(const PRUnichar* aString) {return Assign(aString);} + +#ifndef NEW_STRING_APIS + nsCString& operator=(const nsCString& aString) {return Assign(aString);} + nsCString& operator=(const nsStr& aString) {return Assign(aString);} + nsCString& operator=(const char* aCString) {return Assign(aCString);} #ifdef AIX nsCString& operator=(const nsSubsumeCStr& aSubsumeString); // AIX requires a const here #else nsCString& operator=(nsSubsumeCStr& aSubsumeString); #endif +#endif /** * Here's a bunch of methods that append varying types... * @param various... * @return this */ - nsCString& operator+=(const nsCString& aString){return Append(aString,(PRInt32)aString.mLength);} - nsCString& operator+=(const char* aCString) {return Append(aCString);} nsCString& operator+=(const PRUnichar aChar){return Append(aChar);} nsCString& operator+=(const char aChar){return Append(aChar);} nsCString& operator+=(const int anInt){return Append(anInt,10);} +#ifndef NEW_STRING_APIS + nsCString& operator+=(const nsCString& aString){return Append(aString,(PRInt32)aString.mLength);} + nsCString& operator+=(const char* aCString) {return Append(aCString);} +#endif /* * Appends n characters from given string to this, diff --git a/xpcom/string/obsolete/nsString2.cpp b/xpcom/string/obsolete/nsString2.cpp index c552636972f..1565df86da4 100644 --- a/xpcom/string/obsolete/nsString2.cpp +++ b/xpcom/string/obsolete/nsString2.cpp @@ -1028,6 +1028,7 @@ nsString& nsString::Assign(PRUnichar aChar) { return Append(aChar); } +#ifndef NEW_STRING_APIS /** * WARNING! THIS IS A VERY SPECIAL METHOD. * This method "steals" the contents of aSource and hands it to aDest. @@ -1046,7 +1047,7 @@ nsString& nsString::operator=(const nsSubsumeStr& aSubsumeString) { #endif // AIX return *this; } - +#endif /** * append given string to this string; diff --git a/xpcom/string/obsolete/nsString2.h b/xpcom/string/obsolete/nsString2.h index 9394ed50383..49ca7973ad4 100644 --- a/xpcom/string/obsolete/nsString2.h +++ b/xpcom/string/obsolete/nsString2.h @@ -235,6 +235,7 @@ public: PRBool SetCharAt(PRUnichar aChar,PRUint32 anIndex); +#ifndef NEW_STRING_APIS /********************************************************************** String concatenation methods... *********************************************************************/ @@ -274,6 +275,7 @@ public: * @return newly created string */ nsSubsumeStr operator+(PRUnichar aChar); +#endif /********************************************************************** Lexomorphic transforms... @@ -464,34 +466,38 @@ public: * @param aString: string to be added to this * @return this */ - nsString& operator=(const nsString& aString) {return Assign(aString);} - nsString& operator=(const nsStr& aString) {return Assign(aString);} nsString& operator=(char aChar) {return Assign(aChar);} nsString& operator=(PRUnichar aChar) {return Assign(aChar);} nsString& operator=(const char* aCString) {return Assign(aCString);} + +#ifndef NEW_STRING_APIS + nsString& operator=(const nsString& aString) {return Assign(aString);} + nsString& operator=(const nsStr& aString) {return Assign(aString);} nsString& operator=(const PRUnichar* aString) {return Assign(aString);} #ifdef AIX nsString& operator=(const nsSubsumeStr& aSubsumeString); // AIX requires a const here #else nsString& operator=(nsSubsumeStr& aSubsumeString); #endif +#endif /** * Here's a bunch of methods that append varying types... * @param various... * @return this */ - nsString& operator+=(const nsStr& aString){return Append(aString,(PRInt32)aString.mLength);} - nsString& operator+=(const nsString& aString){return Append(aString,(PRInt32)aString.mLength);} nsString& operator+=(const char* aCString) {return Append(aCString);} nsString& operator+=(const char aChar) { return Append((PRUnichar) (unsigned char)aChar); } - - nsString& operator+=(const PRUnichar* aUCString) {return Append(aUCString);} nsString& operator+=(const PRUnichar aChar){return Append(aChar);} nsString& operator+=(const int anInt){return Append(anInt,10);} +#ifndef NEW_STRING_APIS + nsString& operator+=(const nsStr& aString){return Append(aString,(PRInt32)aString.mLength);} + nsString& operator+=(const nsString& aString){return Append(aString,(PRInt32)aString.mLength);} + nsString& operator+=(const PRUnichar* aUCString) {return Append(aUCString);} +#endif /* * Appends n characters from given string to this, * This version computes the length of your given string diff --git a/xpcom/string/public/nsAReadableString.h b/xpcom/string/public/nsAReadableString.h index 3b8209e4bbd..b803765e649 100644 --- a/xpcom/string/public/nsAReadableString.h +++ b/xpcom/string/public/nsAReadableString.h @@ -38,7 +38,8 @@ #include // for |bidirectional_iterator_tag| -#include +#include + // for |min|, |copy| /* diff --git a/xpcom/string/public/nsAWritableString.h b/xpcom/string/public/nsAWritableString.h index cab014fb615..6a9106e4b0d 100644 --- a/xpcom/string/public/nsAWritableString.h +++ b/xpcom/string/public/nsAWritableString.h @@ -321,7 +321,6 @@ class basic_nsAWritableString } }; -NS_DEF_STRING_COMPARISONS(basic_nsAWritableString) template typename basic_nsAWritableString::WritingIterator diff --git a/xpcom/string/public/nsCharTraits.h b/xpcom/string/public/nsCharTraits.h index 87092790af4..bf44eb689bd 100644 --- a/xpcom/string/public/nsCharTraits.h +++ b/xpcom/string/public/nsCharTraits.h @@ -24,7 +24,8 @@ #ifndef _nsCharTraits_h__ #define _nsCharTraits_h__ -#include +#include + // for |EOF|, |WEOF| #include // for |memcpy|, et al @@ -330,6 +331,7 @@ struct nsCharTraits #endif }; +#if 0 NS_SPECIALIZE_TEMPLATE struct nsCharTraits { @@ -454,5 +456,6 @@ struct nsCharTraits // static state_type get_state( pos_type ); #endif }; +#endif #endif // !defined(_nsCharTraits_h__)