summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp9
-rw-r--r--src/gui/sdlfont.cpp2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index d8cc42011..8d05fc26d 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -449,26 +449,25 @@ void Gui::updateFonts()
if (fontFile.empty())
fontFile = branding.getStringValue("font");
- static_cast<SDLFont*>(mGuiFont)->loadFont(fontFile, fontSize);
+ mGuiFont->loadFont(fontFile, fontSize);
fontFile = config.getValue("particleFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("particleFont");
- static_cast<SDLFont*>(mInfoParticleFont)->loadFont(
- fontFile, fontSize, TTF_STYLE_BOLD);
+ mInfoParticleFont->loadFont(fontFile, fontSize, TTF_STYLE_BOLD);
fontFile = config.getValue("boldFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("boldFont");
- static_cast<SDLFont*>(boldFont)->loadFont(fontFile, fontSize);
+ boldFont->loadFont(fontFile, fontSize);
fontFile = config.getValue("secureFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("secureFont");
- static_cast<SDLFont*>(mSecureFont)->loadFont(fontFile, fontSize);
+ mSecureFont->loadFont(fontFile, fontSize);
}
void Gui::distributeMouseEvent(gcn::Widget* source, int type, int button,
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index cc76790d1..8713367bc 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -186,7 +186,7 @@ void SDLFont::clear()
for (unsigned short f = 0; f < static_cast<unsigned short>(
CACHES_NUMBER); f ++)
{
- mCache[static_cast<unsigned short>(f)].clear();
+ mCache[f].clear();
}
}