bug 235504, remove const char* version of nsCString::EqualsWithConversion,

second try
r=darin sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@154940 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2004-04-15 20:44:53 +00:00
parent aff7d184e9
commit fbd68c22ff
3 changed files with 7 additions and 10 deletions

View File

@@ -246,6 +246,7 @@ class nsTString_CharT : public nsTSubstring_CharT
#endif
/**
* Equality check between given string and this string.
*
@@ -254,7 +255,11 @@ class nsTString_CharT : public nsTSubstring_CharT
* @param aCount tells us how many chars to compare
* @return boolean
*/
#ifdef CharT_is_char
PRBool EqualsIgnoreCase( const char* aString, PRInt32 aCount=-1 ) const {
return Compare(aString, PR_TRUE, aCount) == 0;
}
#else
NS_COM PRBool EqualsWithConversion( const char* aString, PRBool aIgnoreCase=PR_FALSE, PRInt32 aCount=-1 ) const;
PRBool EqualsIgnoreCase( const char* aString, PRInt32 aCount=-1 ) const
{
@@ -262,8 +267,6 @@ class nsTString_CharT : public nsTSubstring_CharT
}
#ifdef CharT_is_PRUnichar
/**
* Determine if given buffer is plain ascii
*

View File

@@ -1100,12 +1100,6 @@ nsString::CompareWithConversion( const char* aString, PRBool aIgnoreCase, PRInt3
return result;
}
PRBool
nsCString::EqualsWithConversion( const char* aString, PRBool aIgnoreCase, PRInt32 aCount ) const
{
return Compare(aString, aIgnoreCase, aCount) == 0;
}
PRBool
nsString::EqualsWithConversion( const char* aString, PRBool aIgnoreCase, PRInt32 aCount ) const
{

View File

@@ -297,7 +297,7 @@ WindowPtr nsWindowUtils::GetNamedOrFrontmostWindow(TWindowKind windowKind, const
// ...see if its name is the desired one.
Str255 pascalTitle;
GetWTitle(windowRef, pascalTitle);
if (windowNameString.EqualsWithConversion((const char*)&pascalTitle[1], PR_FALSE, pascalTitle[0]))
if (windowNameString.Compare((const char*)&pascalTitle[1], PR_FALSE, pascalTitle[0]) == 0)
{
windowPtr = (WindowPtr)windowRef; // WindowRef is the WindowPtr.
break;