From fbfadbfae044b13e533358293519509f216da21c Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Tue, 4 Apr 2000 05:45:57 +0000 Subject: [PATCH] Start trying to compile on Unix with new changes. r=scc --- string/public/nsAReadableString.h | 68 +++++++++++++------------ xpcom/ds/nsAReadableString.h | 68 +++++++++++++------------ xpcom/string/public/nsAReadableString.h | 68 +++++++++++++------------ 3 files changed, 105 insertions(+), 99 deletions(-) diff --git a/string/public/nsAReadableString.h b/string/public/nsAReadableString.h index 6f5cc6d54c48..0e3a8ea5f092 100644 --- a/string/public/nsAReadableString.h +++ b/string/public/nsAReadableString.h @@ -386,22 +386,6 @@ basic_nsAReadableString::Equals( const basic_nsAReadableString& rh return Compare(rhs) == 0; } -template -inline -PRBool -basic_nsAReadableString::Equals( const CharT* rhs ) const - { - return Compare(basic_nsLiteralString(rhs)) == 0; - } - -template -inline -PRBool -basic_nsAReadableString::Equals( const CharT* rhs, PRUint32 rhs_length ) const - { - return Compare(basic_nsLiteralString(rhs, rhs_length)) == 0; - } - template inline PRBool @@ -573,21 +557,6 @@ basic_nsAReadableString::Compare( const basic_nsAReadableString& r return ::Compare(*this, rhs); } -template -inline -int -basic_nsAReadableString::Compare( const CharT* rhs ) const - { - return ::Compare(*this, basic_nsLiteralString(rhs)); - } - -template -inline -int -basic_nsAReadableString::Compare( const CharT* rhs, PRUint32 rhs_length ) const - { - return ::Compare(*this, basic_nsLiteralString(rhs, rhs_length)); - } @@ -678,6 +647,39 @@ basic_nsLiteralString::Length() const } +// XXX Note that these are located here because some compilers are +// sensitive to the ordering of declarations with regard to templates. +template +inline +PRBool +basic_nsAReadableString::Equals( const CharT* rhs ) const + { + return Compare(basic_nsLiteralString(rhs)) == 0; + } + +template +inline +PRBool +basic_nsAReadableString::Equals( const CharT* rhs, PRUint32 rhs_length ) const + { + return Compare(basic_nsLiteralString(rhs, rhs_length)) == 0; + } + +template +inline +int +basic_nsAReadableString::Compare( const CharT* rhs ) const + { + return ::Compare(*this, basic_nsLiteralString(rhs)); + } + +template +inline +int +basic_nsAReadableString::Compare( const CharT* rhs, PRUint32 rhs_length ) const + { + return ::Compare(*this, basic_nsLiteralString(rhs, rhs_length)); + } @@ -984,7 +986,7 @@ copy_string( InputIterator first, InputIterator last, OutputIterator result ) NS_ASSERTION(lengthToCopy, "|copy_string| will never terminate"); - nsCharTraits::copy(result.operator->(), first.operator->(), lengthToCopy); + nsCharTraits::copy(result.operator->(), first.operator->(), lengthToCopy); first += PRInt32(lengthToCopy); result += PRInt32(lengthToCopy); @@ -1026,7 +1028,7 @@ copy_string_backward( InputIterator first, InputIterator last, OutputIterator re NS_ASSERTION(lengthToCopy, "|copy_string_backward| will never terminate"); - nsCharTraits::move(result.operator->()-lengthToCopy, last.operator->()-lengthToCopy, lengthToCopy); + nsCharTraits::move(result.operator->()-lengthToCopy, last.operator->()-lengthToCopy, lengthToCopy); last -= PRInt32(lengthToCopy); result -= PRInt32(lengthToCopy); diff --git a/xpcom/ds/nsAReadableString.h b/xpcom/ds/nsAReadableString.h index 6f5cc6d54c48..0e3a8ea5f092 100644 --- a/xpcom/ds/nsAReadableString.h +++ b/xpcom/ds/nsAReadableString.h @@ -386,22 +386,6 @@ basic_nsAReadableString::Equals( const basic_nsAReadableString& rh return Compare(rhs) == 0; } -template -inline -PRBool -basic_nsAReadableString::Equals( const CharT* rhs ) const - { - return Compare(basic_nsLiteralString(rhs)) == 0; - } - -template -inline -PRBool -basic_nsAReadableString::Equals( const CharT* rhs, PRUint32 rhs_length ) const - { - return Compare(basic_nsLiteralString(rhs, rhs_length)) == 0; - } - template inline PRBool @@ -573,21 +557,6 @@ basic_nsAReadableString::Compare( const basic_nsAReadableString& r return ::Compare(*this, rhs); } -template -inline -int -basic_nsAReadableString::Compare( const CharT* rhs ) const - { - return ::Compare(*this, basic_nsLiteralString(rhs)); - } - -template -inline -int -basic_nsAReadableString::Compare( const CharT* rhs, PRUint32 rhs_length ) const - { - return ::Compare(*this, basic_nsLiteralString(rhs, rhs_length)); - } @@ -678,6 +647,39 @@ basic_nsLiteralString::Length() const } +// XXX Note that these are located here because some compilers are +// sensitive to the ordering of declarations with regard to templates. +template +inline +PRBool +basic_nsAReadableString::Equals( const CharT* rhs ) const + { + return Compare(basic_nsLiteralString(rhs)) == 0; + } + +template +inline +PRBool +basic_nsAReadableString::Equals( const CharT* rhs, PRUint32 rhs_length ) const + { + return Compare(basic_nsLiteralString(rhs, rhs_length)) == 0; + } + +template +inline +int +basic_nsAReadableString::Compare( const CharT* rhs ) const + { + return ::Compare(*this, basic_nsLiteralString(rhs)); + } + +template +inline +int +basic_nsAReadableString::Compare( const CharT* rhs, PRUint32 rhs_length ) const + { + return ::Compare(*this, basic_nsLiteralString(rhs, rhs_length)); + } @@ -984,7 +986,7 @@ copy_string( InputIterator first, InputIterator last, OutputIterator result ) NS_ASSERTION(lengthToCopy, "|copy_string| will never terminate"); - nsCharTraits::copy(result.operator->(), first.operator->(), lengthToCopy); + nsCharTraits::copy(result.operator->(), first.operator->(), lengthToCopy); first += PRInt32(lengthToCopy); result += PRInt32(lengthToCopy); @@ -1026,7 +1028,7 @@ copy_string_backward( InputIterator first, InputIterator last, OutputIterator re NS_ASSERTION(lengthToCopy, "|copy_string_backward| will never terminate"); - nsCharTraits::move(result.operator->()-lengthToCopy, last.operator->()-lengthToCopy, lengthToCopy); + nsCharTraits::move(result.operator->()-lengthToCopy, last.operator->()-lengthToCopy, lengthToCopy); last -= PRInt32(lengthToCopy); result -= PRInt32(lengthToCopy); diff --git a/xpcom/string/public/nsAReadableString.h b/xpcom/string/public/nsAReadableString.h index 6f5cc6d54c48..0e3a8ea5f092 100644 --- a/xpcom/string/public/nsAReadableString.h +++ b/xpcom/string/public/nsAReadableString.h @@ -386,22 +386,6 @@ basic_nsAReadableString::Equals( const basic_nsAReadableString& rh return Compare(rhs) == 0; } -template -inline -PRBool -basic_nsAReadableString::Equals( const CharT* rhs ) const - { - return Compare(basic_nsLiteralString(rhs)) == 0; - } - -template -inline -PRBool -basic_nsAReadableString::Equals( const CharT* rhs, PRUint32 rhs_length ) const - { - return Compare(basic_nsLiteralString(rhs, rhs_length)) == 0; - } - template inline PRBool @@ -573,21 +557,6 @@ basic_nsAReadableString::Compare( const basic_nsAReadableString& r return ::Compare(*this, rhs); } -template -inline -int -basic_nsAReadableString::Compare( const CharT* rhs ) const - { - return ::Compare(*this, basic_nsLiteralString(rhs)); - } - -template -inline -int -basic_nsAReadableString::Compare( const CharT* rhs, PRUint32 rhs_length ) const - { - return ::Compare(*this, basic_nsLiteralString(rhs, rhs_length)); - } @@ -678,6 +647,39 @@ basic_nsLiteralString::Length() const } +// XXX Note that these are located here because some compilers are +// sensitive to the ordering of declarations with regard to templates. +template +inline +PRBool +basic_nsAReadableString::Equals( const CharT* rhs ) const + { + return Compare(basic_nsLiteralString(rhs)) == 0; + } + +template +inline +PRBool +basic_nsAReadableString::Equals( const CharT* rhs, PRUint32 rhs_length ) const + { + return Compare(basic_nsLiteralString(rhs, rhs_length)) == 0; + } + +template +inline +int +basic_nsAReadableString::Compare( const CharT* rhs ) const + { + return ::Compare(*this, basic_nsLiteralString(rhs)); + } + +template +inline +int +basic_nsAReadableString::Compare( const CharT* rhs, PRUint32 rhs_length ) const + { + return ::Compare(*this, basic_nsLiteralString(rhs, rhs_length)); + } @@ -984,7 +986,7 @@ copy_string( InputIterator first, InputIterator last, OutputIterator result ) NS_ASSERTION(lengthToCopy, "|copy_string| will never terminate"); - nsCharTraits::copy(result.operator->(), first.operator->(), lengthToCopy); + nsCharTraits::copy(result.operator->(), first.operator->(), lengthToCopy); first += PRInt32(lengthToCopy); result += PRInt32(lengthToCopy); @@ -1026,7 +1028,7 @@ copy_string_backward( InputIterator first, InputIterator last, OutputIterator re NS_ASSERTION(lengthToCopy, "|copy_string_backward| will never terminate"); - nsCharTraits::move(result.operator->()-lengthToCopy, last.operator->()-lengthToCopy, lengthToCopy); + nsCharTraits::move(result.operator->()-lengthToCopy, last.operator->()-lengthToCopy, lengthToCopy); last -= PRInt32(lengthToCopy); result -= PRInt32(lengthToCopy);