From ada5f4f00fb0d41375e3f5d5391f629b46565847 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 30 Dec 2005 13:19:40 +0000 Subject: [PATCH] Use ASSERT like a function. --- stepmania/src/ActorUtil.cpp | 2 +- stepmania/src/BackgroundUtil.cpp | 2 +- stepmania/src/PrefsManager.cpp | 4 ++-- stepmania/src/RageDisplay_OGL.cpp | 2 +- stepmania/src/ScreenJukebox.cpp | 2 +- stepmania/src/ScreenManager.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 621fb39b0c..479c0e37d1 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -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::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 ); diff --git a/stepmania/src/BackgroundUtil.cpp b/stepmania/src/BackgroundUtil.cpp index ce82af10e3..1d596fbafd 100644 --- a/stepmania/src/BackgroundUtil.cpp +++ b/stepmania/src/BackgroundUtil.cpp @@ -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 ); diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 9868942543..5f91b3844c 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -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::const_iterator iter = m_mapGameNameToGamePrefs.find( m_sCurrentGame ); diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 55832e2e64..f41347eda2 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -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() diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index f0a64b6860..8dc60b6a63 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -64,7 +64,7 @@ void ScreenJukebox::SetSong() } } - ASSERT( !vDifficultiesToShow.empty() ) + ASSERT( !vDifficultiesToShow.empty() ); // // Search for a Song and Steps to play during the demo diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 00a8e6c710..a62d2e7151 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -466,7 +466,7 @@ Screen* ScreenManager::MakeNewScreen( const CString &sScreenName ) CString sClassName = THEME->GetMetric(sScreenName,"Class"); map::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();