added some #ifdef logic to allow me to turn NEW_STRING_APIS off, so I can continue to profile for bloat; added an implementation specific |operator+()| to resolve ambiguity with promises on some platforms

This commit is contained in:
scc%mozilla.org 2000-06-11 04:35:02 +00:00
parent 29d26770c9
commit 1d272d98b9
3 changed files with 42 additions and 0 deletions

View File

@ -42,6 +42,11 @@
#define NEW_STRING_APIS 1
#endif //NEW_STRING_APIS
// Need this to enable comparison profiling for a while
#ifdef OLD_STRING_APIS
#undef NEW_STRING_APIS
#endif
#ifndef _nsCString_
#define _nsCString_
@ -796,6 +801,15 @@ private:
void InsertWithConversion( char, PRUint32 );
};
#ifdef NEW_STRING_APIS
inline
nsPromiseConcatenation<char>
operator+( const nsPromiseConcatenation<char>& lhs, const nsCString& rhs )
{
return nsPromiseConcatenation<char>(lhs, rhs);
}
#endif
#ifdef NEW_STRING_APIS
NS_DEF_STRING_COMPARISON_OPERATORS(nsCString, char)
NS_DEF_DERIVED_STRING_OPERATOR_PLUS(nsCString, char);

View File

@ -42,6 +42,11 @@
#define NEW_STRING_APIS 1
#endif //NEW_STRING_APIS
// Need this to enable comparison profiling for a while
#ifdef OLD_STRING_APIS
#undef NEW_STRING_APIS
#endif
#ifndef _nsCString_
#define _nsCString_
@ -796,6 +801,15 @@ private:
void InsertWithConversion( char, PRUint32 );
};
#ifdef NEW_STRING_APIS
inline
nsPromiseConcatenation<char>
operator+( const nsPromiseConcatenation<char>& lhs, const nsCString& rhs )
{
return nsPromiseConcatenation<char>(lhs, rhs);
}
#endif
#ifdef NEW_STRING_APIS
NS_DEF_STRING_COMPARISON_OPERATORS(nsCString, char)
NS_DEF_DERIVED_STRING_OPERATOR_PLUS(nsCString, char);

View File

@ -42,6 +42,11 @@
#define NEW_STRING_APIS 1
#endif //NEW_STRING_APIS
// Need this to enable comparison profiling for a while
#ifdef OLD_STRING_APIS
#undef NEW_STRING_APIS
#endif
#ifndef _nsCString_
#define _nsCString_
@ -796,6 +801,15 @@ private:
void InsertWithConversion( char, PRUint32 );
};
#ifdef NEW_STRING_APIS
inline
nsPromiseConcatenation<char>
operator+( const nsPromiseConcatenation<char>& lhs, const nsCString& rhs )
{
return nsPromiseConcatenation<char>(lhs, rhs);
}
#endif
#ifdef NEW_STRING_APIS
NS_DEF_STRING_COMPARISON_OPERATORS(nsCString, char)
NS_DEF_DERIVED_STRING_OPERATOR_PLUS(nsCString, char);