use ARRAYSIZE macro

This commit is contained in:
Chris Danford
2003-08-02 20:05:46 +00:00
parent f8e4fc2d9c
commit e892ecc027
6 changed files with 7 additions and 10 deletions
+1 -2
View File
@@ -41,9 +41,8 @@ OptionIcon::OptionIcon()
void OptionIcon::Load( PlayerNumber pn, CString sText, bool bHeader )
{
static CString sStopWords[] = { "OFF", "VISIBLE", "VIVID", "STANDARD", "X1", "HOLDS", "DEFAULT", "OVERHEAD" };
const int iNumStopWords = sizeof(sStopWords)/sizeof(sStopWords[0]);
for( int i=0; i<iNumStopWords; i++ )
for( int i=0; i<ARRAYSIZE(sStopWords); i++ )
if( 0==stricmp(sText,sStopWords[i]) )
sText = "";