return NULL -> return CString() for clarity and efficiency
This commit is contained in:
@@ -2763,7 +2763,7 @@ CString GameManager::GetMenuButtonSecondaryFunction( const Game *pGame, GameButt
|
||||
* it) and/or map to a menu button (if m_DedicatedMenuButton or m_SecondaryMenuButton
|
||||
* map to it).
|
||||
*
|
||||
* If a button is only used in gameplay or is only used in menus, return NULL; the
|
||||
* If a button is only used in gameplay or is only used in menus, return CString(); the
|
||||
* primary description is sufficient.
|
||||
*
|
||||
* If a button is used in both gameplay and menus, return szSecondaryNames[] for
|
||||
@@ -2799,12 +2799,12 @@ CString GameManager::GetMenuButtonSecondaryFunction( const Game *pGame, GameButt
|
||||
FOREACH_MenuButton(m)
|
||||
{
|
||||
if( !bUsedInGameplay && pGame->m_DedicatedMenuButton[m] == gb )
|
||||
return NULL;
|
||||
return CString();
|
||||
else if( bUsedInGameplay && pGame->m_SecondaryMenuButton[m] == gb )
|
||||
return szSecondaryNames[m];
|
||||
}
|
||||
|
||||
return NULL; // only used in gameplay
|
||||
return CString(); // only used in gameplay
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user