replace ASSERT(0) with useful fail messages

This commit is contained in:
Devin J. Pohly
2012-12-27 16:59:35 -05:00
parent 376056a0cf
commit bd0e2074ad
71 changed files with 289 additions and 245 deletions
+2 -4
View File
@@ -2966,8 +2966,7 @@ const Style* GameManager::GetHowToPlayStyleForGame( const Game *pGame )
return style;
}
ASSERT(0); // this Game is missing a Style that can be used with HowToPlay
return NULL;
FAIL_M(ssprintf("Game has no Style that can be used with HowToPlay: %s", pGame->m_szName));
}
void GameManager::GetCompatibleStyles( const Game *pGame, int iNumPlayers, vector<const Style*> &vpStylesOut )
@@ -3052,8 +3051,7 @@ int GameManager::GetIndexFromGame( const Game* pGame )
if( g_Games[g] == pGame )
return g;
}
ASSERT(0);
return 0;
FAIL_M(ssprintf("Game not found: %s", pGame->m_szName));
}
const Game* GameManager::GetGameFromIndex( int index )