use find()
This commit is contained in:
@@ -1597,7 +1597,7 @@ void GameState::StoreRankingName( PlayerNumber pn, CString name )
|
|||||||
}
|
}
|
||||||
|
|
||||||
line.MakeUpper();
|
line.MakeUpper();
|
||||||
if( !line.empty() && name.Find(line) != -1 ) // name contains a bad word
|
if( !line.empty() && name.find(line) != string::npos ) // name contains a bad word
|
||||||
{
|
{
|
||||||
LOG->Trace( "entered '%s' matches blacklisted item '%s'", name.c_str(), line.c_str() );
|
LOG->Trace( "entered '%s' matches blacklisted item '%s'", name.c_str(), line.c_str() );
|
||||||
name = "";
|
name = "";
|
||||||
|
|||||||
@@ -686,7 +686,7 @@ void Sprite::SetState( int iNewState )
|
|||||||
if( iNewState != 0 && (iNewState < 0 || iNewState >= (int)m_States.size()) )
|
if( iNewState != 0 && (iNewState < 0 || iNewState >= (int)m_States.size()) )
|
||||||
{
|
{
|
||||||
// Don't warn about number of states in "_blank".
|
// Don't warn about number of states in "_blank".
|
||||||
if( !m_pTexture || m_pTexture->GetID().filename.Find("_blank") == -1 )
|
if( !m_pTexture || m_pTexture->GetID().filename.find("_blank") == string::npos )
|
||||||
{
|
{
|
||||||
CString sError;
|
CString sError;
|
||||||
if( m_pTexture )
|
if( m_pTexture )
|
||||||
@@ -842,7 +842,7 @@ void Sprite::ScaleToClipped( float fWidth, float fHeight )
|
|||||||
}
|
}
|
||||||
SetZoom( 1 );
|
SetZoom( 1 );
|
||||||
}
|
}
|
||||||
else if( m_pTexture->GetID().filename.find("(was rotated)") != m_pTexture->GetID().filename.npos &&
|
else if( m_pTexture->GetID().filename.find("(was rotated)") != string::npos &&
|
||||||
fWidth != -1 && fHeight != -1 )
|
fWidth != -1 && fHeight != -1 )
|
||||||
{
|
{
|
||||||
/* Dumb hack. Normally, we crop all sprites except for diagonal banners,
|
/* Dumb hack. Normally, we crop all sprites except for diagonal banners,
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ static bool ChangeAppPri()
|
|||||||
{
|
{
|
||||||
INPUTMAN->GetDevicesAndDescriptions(vDevices,vDescriptions);
|
INPUTMAN->GetDevicesAndDescriptions(vDevices,vDescriptions);
|
||||||
CString sInputDevices = join( ",", vDescriptions );
|
CString sInputDevices = join( ",", vDescriptions );
|
||||||
if( sInputDevices.Find("NTPAD") != -1 )
|
if( sInputDevices.find("NTPAD") != string::npos )
|
||||||
{
|
{
|
||||||
LOG->Trace( "Using NTPAD. Don't boost priority." );
|
LOG->Trace( "Using NTPAD. Don't boost priority." );
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user