remove DEFAULT_RANKING_NAME. Empty string means "no name", and the default name should always be empty.

This commit is contained in:
Chris Danford
2004-02-11 04:06:27 +00:00
parent ae683f8293
commit 5e39cb5471
4 changed files with 2 additions and 8 deletions
-1
View File
@@ -254,7 +254,6 @@ enum RankingCategory
};
#define FOREACH_RankingCategory( rc ) FOREACH_ENUM( RankingCategory, NUM_RANKING_CATEGORIES, rc )
#define DEFAULT_RANKING_NAME CString("")
const CString RANKING_TO_FILL_IN_MARKER[NUM_PLAYERS] = {"#P1#","#P2#"};
inline bool IsRankingToFillIn( CString sName ) { return !sName.empty() && sName[0]=='#'; }
+2 -1
View File
@@ -1324,8 +1324,9 @@ void GameState::StoreRankingName( PlayerNumber pn, CString name )
line.MakeUpper();
if( !line.empty() && name.Find(line) != -1 ) // name contains a bad word
{
LOG->Trace( "name '%s' contains bad word and will be blanked", name.c_str() );
LOG->Trace( "entered '%s' matches blacklisted item '%s'", name.c_str(), line.c_str() );
name = "";
break;
}
}
}
-3
View File
@@ -422,9 +422,6 @@ void ScreenNameEntry::MenuStart( PlayerNumber pn )
TrimRight( m_sSelectedName[pn], " " );
TrimLeft( m_sSelectedName[pn], " " );
if( m_sSelectedName[pn] == "" )
m_sSelectedName[pn] = DEFAULT_RANKING_NAME;
GAMESTATE->StoreRankingName( pn, m_sSelectedName[pn] );
// save last used ranking name
@@ -415,9 +415,6 @@ void ScreenNameEntryTraditional::Finish( PlayerNumber pn )
TrimRight( selection, " " );
TrimLeft( selection, " " );
if( selection == "" )
selection = DEFAULT_RANKING_NAME;
GAMESTATE->StoreRankingName( pn, selection );
// save last used ranking name