Use ASSERT like a function.
This commit is contained in:
@@ -38,7 +38,7 @@ void ActorUtil::Register( const CString& sClassName, CreateActorFn pfn )
|
||||
Actor* ActorUtil::Create( const CString& sClassName, const CString& sDir, const XNode* pNode )
|
||||
{
|
||||
map<CString,CreateActorFn>::iterator iter = g_pmapRegistrees->find( sClassName );
|
||||
ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Actor '%s' is not registered.",sClassName.c_str()) )
|
||||
ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Actor '%s' is not registered.",sClassName.c_str()) );
|
||||
|
||||
CreateActorFn pfn = iter->second;
|
||||
return (*pfn)( sDir, pNode );
|
||||
|
||||
@@ -211,7 +211,7 @@ static void GetFilterToFileNames( const CString sBaseDir, const Song *pSong, set
|
||||
if( pSong->m_sGenre.empty() )
|
||||
return;
|
||||
|
||||
ASSERT( !pSong->m_sGroupName.empty() )
|
||||
ASSERT( !pSong->m_sGroupName.empty() );
|
||||
IniFile ini;
|
||||
CString sPath = sBaseDir+pSong->m_sGroupName+"/"+"BackgroundMapping.ini";
|
||||
ini.ReadFile( sPath );
|
||||
|
||||
@@ -428,7 +428,7 @@ void PrefsManager::SetCurrentGame( const CString &sGame )
|
||||
|
||||
void PrefsManager::StoreGamePrefs()
|
||||
{
|
||||
ASSERT( !m_sCurrentGame.Get().empty() )
|
||||
ASSERT( !m_sCurrentGame.Get().empty() );
|
||||
|
||||
// save off old values
|
||||
GamePrefs &gp = m_mapGameNameToGamePrefs[m_sCurrentGame];
|
||||
@@ -439,7 +439,7 @@ void PrefsManager::StoreGamePrefs()
|
||||
|
||||
void PrefsManager::RestoreGamePrefs()
|
||||
{
|
||||
ASSERT( !m_sCurrentGame.Get().empty() )
|
||||
ASSERT( !m_sCurrentGame.Get().empty() );
|
||||
|
||||
// load prefs
|
||||
map<CString, GamePrefs>::const_iterator iter = m_mapGameNameToGamePrefs.find( m_sCurrentGame );
|
||||
|
||||
@@ -275,7 +275,7 @@ static void FlushGLErrors()
|
||||
#define AssertNoGLError() \
|
||||
{ \
|
||||
GLenum error = glGetError(); \
|
||||
ASSERT_M( error == GL_NO_ERROR, GLToString(error) ) \
|
||||
ASSERT_M( error == GL_NO_ERROR, GLToString(error) ); \
|
||||
}
|
||||
|
||||
static void TurnOffHardwareVBO()
|
||||
|
||||
@@ -64,7 +64,7 @@ void ScreenJukebox::SetSong()
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT( !vDifficultiesToShow.empty() )
|
||||
ASSERT( !vDifficultiesToShow.empty() );
|
||||
|
||||
//
|
||||
// Search for a Song and Steps to play during the demo
|
||||
|
||||
@@ -466,7 +466,7 @@ Screen* ScreenManager::MakeNewScreen( const CString &sScreenName )
|
||||
CString sClassName = THEME->GetMetric(sScreenName,"Class");
|
||||
|
||||
map<CString,CreateScreenFn>::iterator iter = g_pmapRegistrees->find( sClassName );
|
||||
ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Screen '%s' has an invalid class '%s'",sScreenName.c_str(),sClassName.c_str()) )
|
||||
ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Screen '%s' has an invalid class '%s'",sScreenName.c_str(),sClassName.c_str()) );
|
||||
|
||||
this->ZeroNextUpdate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user