Quickly variables! Into the magic mirror!

This commit is contained in:
Jason Felds
2011-03-14 03:32:07 -04:00
parent e9df4832f6
commit 81ccc7daba
22 changed files with 80 additions and 87 deletions
+6 -6
View File
@@ -311,15 +311,15 @@ const glyph &Font::GetGlyph( wchar_t c ) const
bool Font::FontCompleteForString( const wstring &str ) const
{
map<wchar_t,glyph*>::const_iterator m_pDefault = m_iCharToGlyph.find( FONT_DEFAULT_GLYPH );
if( m_pDefault == m_iCharToGlyph.end() )
map<wchar_t,glyph*>::const_iterator mapDefault = m_iCharToGlyph.find( FONT_DEFAULT_GLYPH );
if( mapDefault == m_iCharToGlyph.end() )
RageException::Throw( "The default glyph is missing from the font \"%s\".", path.c_str() );
for( unsigned i = 0; i < str.size(); ++i )
{
// If the glyph for this character is the default glyph, we're incomplete.
const glyph &g = GetGlyph( str[i] );
if( &g == m_pDefault->second )
if( &g == mapDefault->second )
return false;
}
return true;
@@ -718,8 +718,8 @@ void Font::Load( const RString &sIniPath, RString sChars )
for(unsigned i = 0; i < ImportList.size(); ++i)
{
RString path = THEME->GetPathF( "", ImportList[i], true );
if( path == "" )
RString fPath = THEME->GetPathF( "", ImportList[i], true );
if( fPath == "" )
{
RString s = ssprintf( "Font \"%s\" imports a font \"%s\" that doesn't exist", sIniPath.c_str(), ImportList[i].c_str() );
Dialog::OK( s );
@@ -727,7 +727,7 @@ void Font::Load( const RString &sIniPath, RString sChars )
}
Font subfont;
subfont.Load(path,"");
subfont.Load(fPath,"");
MergeFont(subfont);
//FONT->UnloadFont(subfont);
}