diff --git a/string/obsolete/nsString.h b/string/obsolete/nsString.h index da04e6d358a0..2aaf5f703dfa 100644 --- a/string/obsolete/nsString.h +++ b/string/obsolete/nsString.h @@ -474,9 +474,6 @@ public: nsCString& Append(PRInt32 aInteger,PRInt32 aRadix=10) {AppendInt(aInteger,aRadix); return *this;} nsCString& Append(float aFloat) {AppendFloat(aFloat); return *this;} - void AppendWithConversion(PRInt32 aInteger, PRInt32 aRadix=10) {AppendInt(aInteger,aRadix);} - void AppendWithConversion(float aFloat) {AppendFloat(aFloat);} - /** * Here's a bunch of methods that append varying types... * @param various... @@ -775,6 +772,13 @@ public: static void Recycle(nsCString* aString); static nsCString* CreateString(void); +private: + // NOT TO BE IMPLEMENTED + // these signatures help clients not accidentally call the wrong thing helped by C++ automatic integral promotion + void AssignWithConversion( char ); + void AssignWithConversion( const char*, PRInt32=-1 ); + void AppendWithConversion( char ); + void InsertWithConversion( char, PRUint32 ); }; #if 0//def NEW_STRING_APIS diff --git a/string/obsolete/nsString2.h b/string/obsolete/nsString2.h index 1c8690f8dad2..bafcb690f3e1 100644 --- a/string/obsolete/nsString2.h +++ b/string/obsolete/nsString2.h @@ -510,9 +510,6 @@ public: nsString& Append(const PRUnichar* aString,PRInt32 aCount=-1); nsString& Append(PRUnichar aChar); - void AppendWithConversion( PRInt32 i, PRInt32 radix=10 ) { AppendInt(i, radix); } - void AppendWithConversion( float f ) { AppendFloat(f); } - nsString& Append(const char* aString,PRInt32 aCount=-1) { AppendWithConversion(aString,aCount); return *this; } nsString& Append(char aChar) { AppendWithConversion(aChar); return *this; } nsString& Append(PRInt32 aInteger,PRInt32 aRadix=10) { AppendInt(aInteger,aRadix); return *this; } @@ -714,6 +711,7 @@ public: * @param aCount tells us how many chars to compare * @return -1,0,1 */ + PRInt32 CompareWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; PRInt32 CompareWithConversion(const nsString& aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; PRInt32 CompareWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; @@ -869,6 +867,14 @@ public: static void Recycle(nsString* aString); static nsString* CreateString(void); +private: + // NOT TO BE IMPLEMENTED + // these signatures help clients not accidentally call the wrong thing helped by C++ automatic integral promotion + void AssignWithConversion( PRUnichar ); + void AssignWithConversion( const PRUnichar*, PRInt32=-1 ); + void AppendWithConversion( PRUnichar ); + void AppendWithConversion( const PRUnichar*, PRInt32=-1 ); + void InsertWithConversion( const PRUnichar*, PRUint32, PRInt32=-1 ); }; #if 0//def NEW_STRING_APIS diff --git a/xpcom/ds/nsString.h b/xpcom/ds/nsString.h index da04e6d358a0..2aaf5f703dfa 100644 --- a/xpcom/ds/nsString.h +++ b/xpcom/ds/nsString.h @@ -474,9 +474,6 @@ public: nsCString& Append(PRInt32 aInteger,PRInt32 aRadix=10) {AppendInt(aInteger,aRadix); return *this;} nsCString& Append(float aFloat) {AppendFloat(aFloat); return *this;} - void AppendWithConversion(PRInt32 aInteger, PRInt32 aRadix=10) {AppendInt(aInteger,aRadix);} - void AppendWithConversion(float aFloat) {AppendFloat(aFloat);} - /** * Here's a bunch of methods that append varying types... * @param various... @@ -775,6 +772,13 @@ public: static void Recycle(nsCString* aString); static nsCString* CreateString(void); +private: + // NOT TO BE IMPLEMENTED + // these signatures help clients not accidentally call the wrong thing helped by C++ automatic integral promotion + void AssignWithConversion( char ); + void AssignWithConversion( const char*, PRInt32=-1 ); + void AppendWithConversion( char ); + void InsertWithConversion( char, PRUint32 ); }; #if 0//def NEW_STRING_APIS diff --git a/xpcom/ds/nsString2.h b/xpcom/ds/nsString2.h index 1c8690f8dad2..bafcb690f3e1 100644 --- a/xpcom/ds/nsString2.h +++ b/xpcom/ds/nsString2.h @@ -510,9 +510,6 @@ public: nsString& Append(const PRUnichar* aString,PRInt32 aCount=-1); nsString& Append(PRUnichar aChar); - void AppendWithConversion( PRInt32 i, PRInt32 radix=10 ) { AppendInt(i, radix); } - void AppendWithConversion( float f ) { AppendFloat(f); } - nsString& Append(const char* aString,PRInt32 aCount=-1) { AppendWithConversion(aString,aCount); return *this; } nsString& Append(char aChar) { AppendWithConversion(aChar); return *this; } nsString& Append(PRInt32 aInteger,PRInt32 aRadix=10) { AppendInt(aInteger,aRadix); return *this; } @@ -714,6 +711,7 @@ public: * @param aCount tells us how many chars to compare * @return -1,0,1 */ + PRInt32 CompareWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; PRInt32 CompareWithConversion(const nsString& aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; PRInt32 CompareWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; @@ -869,6 +867,14 @@ public: static void Recycle(nsString* aString); static nsString* CreateString(void); +private: + // NOT TO BE IMPLEMENTED + // these signatures help clients not accidentally call the wrong thing helped by C++ automatic integral promotion + void AssignWithConversion( PRUnichar ); + void AssignWithConversion( const PRUnichar*, PRInt32=-1 ); + void AppendWithConversion( PRUnichar ); + void AppendWithConversion( const PRUnichar*, PRInt32=-1 ); + void InsertWithConversion( const PRUnichar*, PRUint32, PRInt32=-1 ); }; #if 0//def NEW_STRING_APIS diff --git a/xpcom/string/obsolete/nsString.h b/xpcom/string/obsolete/nsString.h index da04e6d358a0..2aaf5f703dfa 100644 --- a/xpcom/string/obsolete/nsString.h +++ b/xpcom/string/obsolete/nsString.h @@ -474,9 +474,6 @@ public: nsCString& Append(PRInt32 aInteger,PRInt32 aRadix=10) {AppendInt(aInteger,aRadix); return *this;} nsCString& Append(float aFloat) {AppendFloat(aFloat); return *this;} - void AppendWithConversion(PRInt32 aInteger, PRInt32 aRadix=10) {AppendInt(aInteger,aRadix);} - void AppendWithConversion(float aFloat) {AppendFloat(aFloat);} - /** * Here's a bunch of methods that append varying types... * @param various... @@ -775,6 +772,13 @@ public: static void Recycle(nsCString* aString); static nsCString* CreateString(void); +private: + // NOT TO BE IMPLEMENTED + // these signatures help clients not accidentally call the wrong thing helped by C++ automatic integral promotion + void AssignWithConversion( char ); + void AssignWithConversion( const char*, PRInt32=-1 ); + void AppendWithConversion( char ); + void InsertWithConversion( char, PRUint32 ); }; #if 0//def NEW_STRING_APIS diff --git a/xpcom/string/obsolete/nsString2.h b/xpcom/string/obsolete/nsString2.h index 1c8690f8dad2..bafcb690f3e1 100644 --- a/xpcom/string/obsolete/nsString2.h +++ b/xpcom/string/obsolete/nsString2.h @@ -510,9 +510,6 @@ public: nsString& Append(const PRUnichar* aString,PRInt32 aCount=-1); nsString& Append(PRUnichar aChar); - void AppendWithConversion( PRInt32 i, PRInt32 radix=10 ) { AppendInt(i, radix); } - void AppendWithConversion( float f ) { AppendFloat(f); } - nsString& Append(const char* aString,PRInt32 aCount=-1) { AppendWithConversion(aString,aCount); return *this; } nsString& Append(char aChar) { AppendWithConversion(aChar); return *this; } nsString& Append(PRInt32 aInteger,PRInt32 aRadix=10) { AppendInt(aInteger,aRadix); return *this; } @@ -714,6 +711,7 @@ public: * @param aCount tells us how many chars to compare * @return -1,0,1 */ + PRInt32 CompareWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; PRInt32 CompareWithConversion(const nsString& aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; PRInt32 CompareWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const; @@ -869,6 +867,14 @@ public: static void Recycle(nsString* aString); static nsString* CreateString(void); +private: + // NOT TO BE IMPLEMENTED + // these signatures help clients not accidentally call the wrong thing helped by C++ automatic integral promotion + void AssignWithConversion( PRUnichar ); + void AssignWithConversion( const PRUnichar*, PRInt32=-1 ); + void AppendWithConversion( PRUnichar ); + void AppendWithConversion( const PRUnichar*, PRInt32=-1 ); + void InsertWithConversion( const PRUnichar*, PRUint32, PRInt32=-1 ); }; #if 0//def NEW_STRING_APIS