From 24a5939846bf593e17e09f3564d941a7c2a5bf27 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 Jan 2014 21:47:02 +0300 Subject: fix code style. --- src/gui/gui.cpp | 6 +++--- src/gui/widgets/progressbar.cpp | 1 + src/gui/widgets/tabs/setup_mods.cpp | 3 +-- src/gui/widgets/tabs/setup_mods.h | 2 +- src/gui/widgets/textfield.cpp | 1 - src/gui/windows/updaterwindow.cpp | 3 ++- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 8dbaec952..a8c31469a 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -151,7 +151,7 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("japanFont"); } - else if(isChinese) + else if (isChinese) { fontFile = config.getValue("chinaFont", ""); if (fontFile.empty()) @@ -179,7 +179,7 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("japanFont"); } - else if(isChinese) + else if (isChinese) { fontFile = config.getValue("chinaFont", ""); if (fontFile.empty()) @@ -257,7 +257,7 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("japanFont"); } - else if(isChinese) + else if (isChinese) { fontFile = config.getValue("chinaFont", ""); if (fontFile.empty()) diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 6454cf47a..aecb323f8 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -46,6 +46,7 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress, mSkin(nullptr), mProgress(progress), mProgressToGo(progress), + mBackgroundColorToGo(), mText(), mVertexes(new ImageCollection), mProgressPalette(backColor), diff --git a/src/gui/widgets/tabs/setup_mods.cpp b/src/gui/widgets/tabs/setup_mods.cpp index f6b43183c..ada0ef686 100644 --- a/src/gui/widgets/tabs/setup_mods.cpp +++ b/src/gui/widgets/tabs/setup_mods.cpp @@ -23,7 +23,6 @@ #include "gui/widgets/tabs/setup_mods.h" #include "configuration.h" -#include "map.h" #include "gui/widgets/layouthelper.h" #include "gui/widgets/setupitem.h" @@ -96,7 +95,7 @@ void Setup_Mods::loadMods() } } -void Setup_Mods::saveMods() +void Setup_Mods::saveMods() const { const ModInfos &mods = ModDB::getAll(); if (mods.empty()) diff --git a/src/gui/widgets/tabs/setup_mods.h b/src/gui/widgets/tabs/setup_mods.h index 6c5c519fd..c385aca08 100644 --- a/src/gui/widgets/tabs/setup_mods.h +++ b/src/gui/widgets/tabs/setup_mods.h @@ -42,7 +42,7 @@ class Setup_Mods final : public SetupTabScroll void loadMods(); - void saveMods(); + void saveMods() const; protected: }; diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index b4d72a1a7..07fde23cd 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -26,7 +26,6 @@ #include "input/inputmanager.h" -#include "input/keydata.h" #include "input/keyevent.h" #include "gui/sdlinput.h" diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 01b1b65cc..fcb26cc36 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -656,7 +656,8 @@ void UpdaterWindow::loadManaPlusUpdates(const std::string &dir, if (strStartWith(name, "manaplus_")) { struct stat statbuf; - std::string fileName = std::string(fixPath).append("/").append(name); + std::string fileName = std::string(fixPath).append( + "/").append(name); if (!stat(fileName.c_str(), &statbuf)) resman->addToSearchPath(fileName, false); } -- cgit v1.2.3-70-g09d2