Added .GetString() to all CStrings passed in vargs

This commit is contained in:
Chris Danford
2002-10-29 07:58:44 +00:00
parent 621d419f22
commit ec202633e9
34 changed files with 184 additions and 182 deletions
+8 -8
View File
@@ -36,7 +36,7 @@ FontManager::~FontManager()
i != m_mapPathToFont.end(); ++i)
{
Font* pFont = i->second;
LOG->Trace( "FONT LEAK: '%s', RefCount = %d.", i->first, pFont->m_iRefCount );
LOG->Trace( "FONT LEAK: '%s', RefCount = %d.", i->first.GetString(), pFont->m_iRefCount );
SAFE_DELETE( pFont );
}
}
@@ -49,7 +49,7 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars )
{
sFontOrTextureFilePath.MakeLower();
// LOG->Trace( "FontManager::LoadFont(%s).", sFontFilePath );
// LOG->Trace( "FontManager::LoadFont(%s).", sFontFilePath.GetString() );
// Convert the path to lowercase so that we don't load duplicates.
@@ -61,7 +61,7 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars )
std::map<CString, Font*>::iterator p = m_mapPathToFont.find(sFontOrTextureFilePath);
if(p != m_mapPathToFont.end()) {
// LOG->Trace( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath, pFont->m_iRefCount) );
// LOG->Trace( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount) );
pFont=p->second;
pFont->m_iRefCount++;
}
@@ -75,7 +75,7 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars )
else
pFont = (Font*) new Font( sFontOrTextureFilePath, sChars );
// LOG->Trace( "FontManager: Loading '%s' from disk.", sFontFilePath);
// LOG->Trace( "FontManager: Loading '%s' from disk.", sFontFilePath.GetString());
m_mapPathToFont[sFontOrTextureFilePath] = pFont;
}
@@ -95,7 +95,7 @@ void FontManager::UnloadFont( CString sFontFilePath )
{
sFontFilePath.MakeLower();
// LOG->Trace( "FontManager::UnloadTexture(%s).", sFontFilePath );
// LOG->Trace( "FontManager::UnloadTexture(%s).", sFontFilePath.GetString() );
if( sFontFilePath == "" )
{
@@ -106,18 +106,18 @@ void FontManager::UnloadFont( CString sFontFilePath )
Font* pFont;
std::map<CString, Font*>::iterator p = m_mapPathToFont.find(sFontFilePath);
if(p == m_mapPathToFont.end())
throw RageException( ssprintf("Tried to Unload a font that wasn't loaded. '%s'", sFontFilePath) );
throw RageException( "Tried to Unload a font that wasn't loaded. '%s'", sFontFilePath.GetString() );
pFont=p->second;
pFont->m_iRefCount--;
if( pFont->m_iRefCount != 0 )
{
// LOG->Trace( ssprintf("FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath, pFont->m_iRefCount) );
// LOG->Trace( "FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount );
return;
}
// There are no more references to this texture.
// LOG->Trace( "FontManager: '%s' will be deleted. It has %d references.", sFontFilePath, pFont->m_iRefCount );
// LOG->Trace( "FontManager: '%s' will be deleted. It has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount );
SAFE_DELETE( pFont ); // free the texture
m_mapPathToFont.erase( p ); // and remove the key in the map
}