Add hack to make functions that used to work with nsXPIDLString continue to work now that nsXPIDLString inherits from nsAString by adding inline methods to resolve ambiguity for compilers that don't support |explicit|. r=jaggernaut sr=waterson b=88411, 88420
git-svn-id: svn://10.0.0.236/trunk@98325 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "nsIAtom.h"
|
||||
|
||||
#include "nsAString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
/* this file will one day be _only_ a compatibility header for clients using the names
|
||||
|ns[C]String| et al ... which we probably want to support forever.
|
||||
@@ -440,6 +441,13 @@ public:
|
||||
PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
/* a hack to make sure things that used to compile continue to compile
|
||||
even on compilers that don't have proper |explicit| support */
|
||||
inline PRBool
|
||||
EqualsWithConversion(const nsXPIDLString &aString, PRBool aIgnoreCase=PR_FALSE, PRInt32 aCount=-1) const
|
||||
{
|
||||
return EqualsWithConversion(aString.get(), aIgnoreCase, aCount);
|
||||
}
|
||||
|
||||
PRBool EqualsIgnoreCase(const char* aString,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* aString,PRInt32 aCount=-1) const;
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#ifndef nsAFlatString_h___
|
||||
#include "nsAFlatString.h"
|
||||
#endif
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
#ifdef STANDALONE_MI_STRING_TESTS
|
||||
class nsAFlatString { public: virtual ~nsAString() { } };
|
||||
@@ -470,10 +471,26 @@ public:
|
||||
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;
|
||||
/* a hack to make sure things that used to compile continue to compile
|
||||
even on compilers that don't have proper |explicit| support */
|
||||
inline PRInt32
|
||||
CompareWithConversion(const nsXPIDLString& aString, PRBool aIgnoreCase=PR_FALSE, PRInt32 aCount=-1) const
|
||||
{
|
||||
return CompareWithConversion(aString.get(), aIgnoreCase, aCount);
|
||||
}
|
||||
|
||||
PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
/* a hack to make sure things that used to compile continue to compile
|
||||
even on compilers that don't have proper |explicit| support */
|
||||
inline PRBool
|
||||
EqualsWithConversion(const nsXPIDLString &aString, PRBool aIgnoreCase=PR_FALSE, PRInt32 aCount=-1) const
|
||||
{
|
||||
return EqualsWithConversion(aString.get(), aIgnoreCase, aCount);
|
||||
}
|
||||
|
||||
|
||||
PRBool EqualsAtom(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const nsString& aString) const;
|
||||
|
||||
Reference in New Issue
Block a user