summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-13 13:56:12 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-13 13:58:33 +0300
commit0faf49cf2c2290e070f34c3f73973642a8e8c96c (patch)
tree69a4a9e14135b649f632130479461b386609703e
parent0c53763c1eb42b9567459451ce47ef7239e151c6 (diff)
downloadmanaverse-0faf49cf2c2290e070f34c3f73973642a8e8c96c.tar.gz
manaverse-0faf49cf2c2290e070f34c3f73973642a8e8c96c.tar.bz2
manaverse-0faf49cf2c2290e070f34c3f73973642a8e8c96c.tar.xz
manaverse-0faf49cf2c2290e070f34c3f73973642a8e8c96c.zip
fix code style and compilation warnings.
-rw-r--r--src/client.cpp16
-rw-r--r--src/client.h14
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/gui/minimap.cpp4
-rw-r--r--src/gui/minimap.h6
-rw-r--r--src/gui/widgets/characterdisplay.cpp6
6 files changed, 24 insertions, 23 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 168dd3df9..67926d50a 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -288,20 +288,20 @@ Client::Client(const Options &options) :
mIcon(nullptr),
mLogicCounterId(nullptr),
mSecondsCounterId(nullptr),
- mLimitFps(false),
- mConfigAutoSaved(false),
- mIsMinimized(false),
- mInputFocused(true),
- mMouseFocused(true),
- mGuiAlpha(1.0f),
mCaption(),
- mNewMessageFlag(false),
mFpsManager(),
mSkin(nullptr),
mButtonPadding(1),
mButtonSpacing(3),
mKeyboardHeight(0),
- mOldUpdates()
+ mOldUpdates(),
+ mGuiAlpha(1.0f),
+ mLimitFps(false),
+ mConfigAutoSaved(false),
+ mIsMinimized(false),
+ mInputFocused(true),
+ mMouseFocused(true),
+ mNewMessageFlag(false)
{
mInstance = this;
diff --git a/src/client.h b/src/client.h
index d9229c271..8110349c5 100644
--- a/src/client.h
+++ b/src/client.h
@@ -415,20 +415,20 @@ private:
SDL_TimerID mLogicCounterId;
SDL_TimerID mSecondsCounterId;
- bool mLimitFps;
- bool mConfigAutoSaved;
- bool mIsMinimized;
- bool mInputFocused;
- bool mMouseFocused;
- float mGuiAlpha;
std::string mCaption;
- bool mNewMessageFlag;
FPSmanager mFpsManager;
Skin *mSkin;
int mButtonPadding;
int mButtonSpacing;
int mKeyboardHeight;
std::string mOldUpdates;
+ float mGuiAlpha;
+ bool mLimitFps;
+ bool mConfigAutoSaved;
+ bool mIsMinimized;
+ bool mInputFocused;
+ bool mMouseFocused;
+ bool mNewMessageFlag;
};
#endif // CLIENT_H
diff --git a/src/defaults.cpp b/src/defaults.cpp
index c5fd20828..cb8d553ac 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -440,6 +440,7 @@ DefaultsData* getFeaturesDefaults()
{
DefaultsData *const configData = new DefaultsData;
AddDEF("languageTab", false);
+ return configData;
}
#undef AddDEF
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 3e696fbda..15372b928 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -47,13 +47,13 @@ bool Minimap::mShow = true;
Minimap::Minimap() :
// TRANSLATORS: mini map window name
Window(_("Map"), false, nullptr, "map.xml"),
- mMapImage(nullptr),
mWidthProportion(0.5),
mHeightProportion(0.5),
- mCustomMapImage(false),
+ mMapImage(nullptr),
mMapOriginX(0),
mMapOriginY(0),
mTextPopup(new TextPopup),
+ mCustomMapImage(false),
mAutoResize(config.getBoolValue("autoresizeminimaps"))
{
setWindowName("Minimap");
diff --git a/src/gui/minimap.h b/src/gui/minimap.h
index 6efe8a786..fab7efea9 100644
--- a/src/gui/minimap.h
+++ b/src/gui/minimap.h
@@ -73,15 +73,15 @@ class Minimap final : public Window, public ConfigListener
void optionChanged(const std::string &name);
private:
- Image *mMapImage;
float mWidthProportion;
float mHeightProportion;
- static bool mShow;
- bool mCustomMapImage;
+ Image *mMapImage;
int mMapOriginX;
int mMapOriginY;
TextPopup *mTextPopup;
+ bool mCustomMapImage;
bool mAutoResize;
+ static bool mShow;
};
extern Minimap *minimap;
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index de0306f7c..7c5f84f61 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -99,17 +99,17 @@ void CharacterDisplay::update()
distributeResizedEvent();
}
-void CharacterDisplay::widgetHidden(const gcn::Event &event)
+void CharacterDisplay::widgetHidden(const gcn::Event &event A_UNUSED)
{
mPopup->setVisible(false);
}
-void CharacterDisplay::mouseExited(gcn::MouseEvent &event)
+void CharacterDisplay::mouseExited(gcn::MouseEvent &event A_UNUSED)
{
mPopup->setVisible(false);
}
-void CharacterDisplay::mouseMoved(gcn::MouseEvent &event)
+void CharacterDisplay::mouseMoved(gcn::MouseEvent &event A_UNUSED)
{
int mouseX = 0;
int mouseY = 0;