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
@@ -225,7 +225,6 @@ const AutoJoyMapping g_AutoJoyMappings[] =
}
},
};
const int NUM_AUTO_JOY_MAPPINGS = ARRAYSIZE(g_AutoJoyMappings);
void InputMapper::AutoMapJoysticksForCurrentGame()
{
@@ -240,7 +239,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame()
{
InputDevice device = vDevices[i];
CString sDescription = vDescriptions[i];
for( int j=0; j<NUM_AUTO_JOY_MAPPINGS; j++ )
for( int j=0; j<ARRAYSIZE(g_AutoJoyMappings); j++ )
{
const AutoJoyMapping& mapping = g_AutoJoyMappings[j];