Avoid using the string type name as a variable name
This commit is contained in:
parent
3a9a85b373
commit
eb343d3f8f
|
@ -520,13 +520,13 @@ bool WildCompareString( const wxString& pattern, const wxString& string_to_tst,
|
|||
bool case_sensitive )
|
||||
{
|
||||
const wxChar* cp = NULL, * mp = NULL;
|
||||
const wxChar* wild, * string;
|
||||
const wxChar* wild, * str;
|
||||
wxString _pattern, _string_to_tst;
|
||||
|
||||
if( case_sensitive )
|
||||
{
|
||||
wild = pattern.GetData();
|
||||
string = string_to_tst.GetData();
|
||||
str = string_to_tst.GetData();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -535,35 +535,36 @@ bool WildCompareString( const wxString& pattern, const wxString& string_to_tst,
|
|||
_string_to_tst = string_to_tst;
|
||||
_string_to_tst.MakeUpper();
|
||||
wild = _pattern.GetData();
|
||||
string = _string_to_tst.GetData();
|
||||
str = _string_to_tst.GetData();
|
||||
}
|
||||
|
||||
while( ( *string ) && ( *wild != '*' ) )
|
||||
while( ( *str ) && ( *wild != '*' ) )
|
||||
{
|
||||
if( ( *wild != *string ) && ( *wild != '?' ) )
|
||||
if( ( *wild != *str ) && ( *wild != '?' ) )
|
||||
return false;
|
||||
|
||||
wild++; string++;
|
||||
wild++;
|
||||
str++;
|
||||
}
|
||||
|
||||
while( *string )
|
||||
while( *str )
|
||||
{
|
||||
if( *wild == '*' )
|
||||
{
|
||||
if( !*++wild )
|
||||
return 1;
|
||||
mp = wild;
|
||||
cp = string + 1;
|
||||
cp = str + 1;
|
||||
}
|
||||
else if( ( *wild == *string ) || ( *wild == '?' ) )
|
||||
else if( ( *wild == *str ) || ( *wild == '?' ) )
|
||||
{
|
||||
wild++;
|
||||
string++;
|
||||
str++;
|
||||
}
|
||||
else
|
||||
{
|
||||
wild = mp;
|
||||
string = cp++;
|
||||
str = cp++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue