From bbb587c352d48d4774133b56ce4c7f9bfd77c1e7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 May 2012 22:30:56 +0300 Subject: Fix code style. --- src/gui/gui.cpp | 9 ++++----- src/gui/sdlfont.cpp | 2 +- src/net/tmwa/npchandler.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src') 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(mGuiFont)->loadFont(fontFile, fontSize); + mGuiFont->loadFont(fontFile, fontSize); fontFile = config.getValue("particleFont", ""); if (fontFile.empty()) fontFile = branding.getStringValue("particleFont"); - static_cast(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(boldFont)->loadFont(fontFile, fontSize); + boldFont->loadFont(fontFile, fontSize); fontFile = config.getValue("secureFont", ""); if (fontFile.empty()) fontFile = branding.getStringValue("secureFont"); - static_cast(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( CACHES_NUMBER); f ++) { - mCache[static_cast(f)].clear(); + mCache[f].clear(); } } diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 837b83337..378d92dfe 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -143,7 +143,7 @@ void NpcHandler::listInput(int npcId, unsigned char value) { MessageOut outMsg(CMSG_NPC_LIST_CHOICE); outMsg.writeInt32(npcId); - outMsg.writeInt8(static_cast(value)); + outMsg.writeInt8(value); } void NpcHandler::integerInput(int npcId, int value) -- cgit v1.2.3-70-g09d2