summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-14 17:06:02 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-14 17:06:02 +0300
commit6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d (patch)
treef1acb027394af1aec49790354df97da4665488b7
parenta7d7346b9eb3fa62a8912e31d5c00f8e05390425 (diff)
downloadManaVerse-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.gz
ManaVerse-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.bz2
ManaVerse-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.xz
ManaVerse-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.zip
another fixes from cpplint.
-rw-r--r--src/actor.h2
-rw-r--r--src/actorsprite.h2
-rw-r--r--src/actorspritelistener.h2
-rw-r--r--src/actorspritemanager.h12
-rw-r--r--src/animationdelayload.h2
-rw-r--r--src/auctionmanager.h2
-rw-r--r--src/avatar.h2
-rw-r--r--src/being.h1
-rw-r--r--src/client.cpp9
-rw-r--r--src/client.h18
-rw-r--r--src/commandhandler.h2
-rw-r--r--src/commands.h4
-rw-r--r--src/compoundsprite.h2
-rw-r--r--src/configuration.h9
-rw-r--r--src/debug.h4
-rw-r--r--src/debug/debug_new.h5
-rw-r--r--src/debug/fast_mutex.h8
-rw-r--r--src/debug/static_assert.h2
-rw-r--r--src/dropshortcut.h1
-rw-r--r--src/effectmanager.h2
-rw-r--r--src/emoteshortcut.h5
-rw-r--r--src/game.h1
-rw-r--r--src/graphicsvertexes.h2
-rw-r--r--src/gui/beingpopup.h2
-rw-r--r--src/gui/buydialog.h4
-rw-r--r--src/gui/changeemaildialog.h4
-rw-r--r--src/gui/changepassworddialog.h2
-rw-r--r--src/gui/charcreatedialog.h2
-rw-r--r--src/gui/charselectdialog.h2
-rw-r--r--src/gui/chatwindow.h10
-rw-r--r--src/gui/didyouknowwindow.cpp2
-rw-r--r--src/gui/editserverdialog.h2
-rw-r--r--src/gui/gui.h4
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/itemamountwindow.h2
-rw-r--r--src/gui/itempopup.h2
-rw-r--r--src/gui/ministatuswindow.h2
-rw-r--r--src/gui/npcdialog.h5
-rw-r--r--src/gui/npcpostdialog.h2
-rw-r--r--src/gui/palette.h2
-rw-r--r--src/gui/questswindow.h6
-rw-r--r--src/gui/quitdialog.h2
-rw-r--r--src/gui/registerdialog.h2
-rw-r--r--src/gui/sdlinput.h3
-rw-r--r--src/gui/selldialog.h4
-rw-r--r--src/gui/setup.cpp2
-rw-r--r--src/gui/setup_audio.h2
-rw-r--r--src/gui/setup_chat.h2
-rw-r--r--src/gui/setup_colors.h4
-rw-r--r--src/gui/setup_input.h2
-rw-r--r--src/gui/setup_joystick.h2
-rw-r--r--src/gui/setup_other.h2
-rw-r--r--src/gui/setup_perfomance.h2
-rw-r--r--src/gui/setup_players.h2
-rw-r--r--src/gui/setup_relations.h2
-rw-r--r--src/gui/setup_theme.h2
-rw-r--r--src/gui/setup_touch.h2
-rw-r--r--src/gui/setup_video.h2
-rw-r--r--src/gui/setup_visual.h2
-rw-r--r--src/gui/setupactiondata.h2
-rw-r--r--src/gui/socialwindow.cpp3
-rw-r--r--src/gui/socialwindow.h2
-rw-r--r--src/gui/spellpopup.h2
-rw-r--r--src/gui/statuspopup.h2
-rw-r--r--src/gui/textcommandeditor.h2
-rw-r--r--src/gui/textpopup.h2
-rw-r--r--src/gui/unregisterdialog.h2
-rw-r--r--src/gui/updaterwindow.h3
-rw-r--r--src/gui/userpalette.cpp2
-rw-r--r--src/gui/userpalette.h2
-rw-r--r--src/gui/whoisonline.cpp2
-rw-r--r--src/gui/widgets/battletab.h2
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/chattab.h2
-rw-r--r--src/gui/widgets/container.h2
-rw-r--r--src/gui/widgets/desktop.h4
-rw-r--r--src/gui/widgets/dropdown.h3
-rw-r--r--src/gui/widgets/flowcontainer.cpp2
-rw-r--r--src/gui/widgets/gmtab.h4
-rw-r--r--src/gui/widgets/guitable.h7
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/layout.h8
-rw-r--r--src/gui/widgets/layouthelper.h4
-rw-r--r--src/gui/widgets/playerbox.h2
-rw-r--r--src/gui/widgets/progressindicator.h2
-rw-r--r--src/gui/widgets/radiobutton.h2
-rw-r--r--src/gui/widgets/setuptab.h2
-rw-r--r--src/gui/widgets/setuptabscroll.h2
-rw-r--r--src/gui/widgets/shopitems.h4
-rw-r--r--src/gui/widgets/shoplistbox.h2
-rw-r--r--src/gui/widgets/slider.h2
-rw-r--r--src/gui/widgets/sliderlist.h2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h2
-rw-r--r--src/gui/widgets/tab.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp4
-rw-r--r--src/gui/widgets/tabbedarea.h2
-rw-r--r--src/gui/widgets/tablemodel.h2
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/tradetab.h2
-rw-r--r--src/gui/widgets/whispertab.h2
-rw-r--r--src/gui/widgets/widget2.h2
-rw-r--r--src/gui/widgets/windowcontainer.h2
-rw-r--r--src/gui/windowmenu.h2
-rw-r--r--src/gui/worldselectdialog.h4
-rw-r--r--src/guichan/include/guichan/actionevent.hpp5
-rw-r--r--src/guichan/include/guichan/actionlistener.hpp7
-rw-r--r--src/guichan/include/guichan/basiccontainer.hpp4
-rw-r--r--src/guichan/include/guichan/cliprectangle.hpp5
-rw-r--r--src/guichan/include/guichan/color.hpp7
-rw-r--r--src/guichan/include/guichan/deathlistener.hpp7
-rw-r--r--src/guichan/include/guichan/event.hpp6
-rw-r--r--src/guichan/include/guichan/exception.hpp7
-rw-r--r--src/guichan/include/guichan/focushandler.hpp7
-rw-r--r--src/guichan/include/guichan/focuslistener.hpp9
-rw-r--r--src/guichan/include/guichan/font.hpp5
-rw-r--r--src/guichan/include/guichan/graphics.hpp4
-rw-r--r--src/guichan/include/guichan/gui.hpp5
-rw-r--r--src/guichan/include/guichan/image.hpp5
-rw-r--r--src/guichan/include/guichan/input.hpp5
-rw-r--r--src/guichan/include/guichan/inputevent.hpp5
-rw-r--r--src/guichan/include/guichan/key.hpp7
-rw-r--r--src/guichan/include/guichan/keyevent.hpp4
-rw-r--r--src/guichan/include/guichan/keyinput.hpp7
-rw-r--r--src/guichan/include/guichan/keylistener.hpp5
-rw-r--r--src/guichan/include/guichan/listmodel.hpp5
-rw-r--r--src/guichan/include/guichan/mouseevent.hpp6
-rw-r--r--src/guichan/include/guichan/mouseinput.hpp7
-rw-r--r--src/guichan/include/guichan/mouselistener.hpp14
-rw-r--r--src/guichan/include/guichan/platform.hpp2
-rw-r--r--src/guichan/include/guichan/rectangle.hpp5
-rw-r--r--src/guichan/include/guichan/sdl/sdlgraphics.hpp5
-rw-r--r--src/guichan/include/guichan/sdl/sdlpixel.hpp10
-rw-r--r--src/guichan/include/guichan/selectionevent.hpp7
-rw-r--r--src/guichan/include/guichan/selectionlistener.hpp7
-rw-r--r--src/guichan/include/guichan/widget.hpp14
-rw-r--r--src/guichan/include/guichan/widgetlistener.hpp5
-rw-r--r--src/guichan/include/guichan/widgets/button.hpp6
-rw-r--r--src/guichan/include/guichan/widgets/checkbox.hpp5
-rw-r--r--src/guichan/include/guichan/widgets/container.hpp5
-rw-r--r--src/guichan/include/guichan/widgets/label.hpp6
-rw-r--r--src/guichan/include/guichan/widgets/listbox.hpp6
-rw-r--r--src/guichan/include/guichan/widgets/radiobutton.hpp5
-rw-r--r--src/guichan/include/guichan/widgets/scrollarea.hpp14
-rw-r--r--src/guichan/include/guichan/widgets/slider.hpp8
-rw-r--r--src/guichan/include/guichan/widgets/textbox.hpp6
-rw-r--r--src/guichan/include/guichan/widgets/textfield.hpp6
-rw-r--r--src/guichan/include/guichan/widgets/window.hpp6
-rw-r--r--src/guichan/mouseinput.cpp2
-rw-r--r--src/guichan/sdl/sdlgraphics.cpp1
-rw-r--r--src/guichan/widget.cpp4
-rw-r--r--src/guild.h2
-rw-r--r--src/guildmanager.h2
-rw-r--r--src/imagesprite.h4
-rw-r--r--src/inputmanager.h26
-rw-r--r--src/itemshortcut.h1
-rw-r--r--src/joystick.h2
-rw-r--r--src/keydata.h2
-rw-r--r--src/localconsts.h24
-rw-r--r--src/localplayer.h35
-rw-r--r--src/main.h12
-rw-r--r--src/map.cpp2
-rw-r--r--src/map.h15
-rw-r--r--src/mobileopenglgraphics.h2
-rw-r--r--src/mumblemanager.cpp4
-rw-r--r--src/net/chathandler.h2
-rw-r--r--src/net/ea/adminhandler.h2
-rw-r--r--src/net/ea/beinghandler.h4
-rw-r--r--src/net/ea/buysellhandler.h2
-rw-r--r--src/net/ea/charserverhandler.h2
-rw-r--r--src/net/ea/chathandler.h2
-rw-r--r--src/net/ea/gamehandler.h4
-rw-r--r--src/net/ea/gui/guildtab.h2
-rw-r--r--src/net/ea/gui/partytab.h2
-rw-r--r--src/net/ea/guildhandler.h4
-rw-r--r--src/net/ea/inventoryhandler.h2
-rw-r--r--src/net/ea/itemhandler.h2
-rw-r--r--src/net/ea/loginhandler.h2
-rw-r--r--src/net/ea/network.h2
-rw-r--r--src/net/ea/npchandler.h2
-rw-r--r--src/net/ea/partyhandler.h2
-rw-r--r--src/net/ea/playerhandler.h2
-rw-r--r--src/net/ea/skillhandler.h2
-rw-r--r--src/net/ea/token.h2
-rw-r--r--src/net/ea/tradehandler.h2
-rw-r--r--src/net/eathena/adminhandler.h2
-rw-r--r--src/net/eathena/beinghandler.cpp2
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/gui/guildtab.h2
-rw-r--r--src/net/eathena/gui/partytab.h2
-rw-r--r--src/net/eathena/guildhandler.h2
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/messagehandler.h2
-rw-r--r--src/net/eathena/messagein.h2
-rw-r--r--src/net/eathena/messageout.h4
-rw-r--r--src/net/eathena/partyhandler.h2
-rw-r--r--src/net/eathena/protocol.h22
-rw-r--r--src/net/eathena/tradehandler.h2
-rw-r--r--src/net/inventoryhandler.h3
-rw-r--r--src/net/logindata.h7
-rw-r--r--src/net/loginhandler.h2
-rw-r--r--src/net/messageout.h2
-rw-r--r--src/net/packetcounters.h1
-rw-r--r--src/net/skillhandler.h2
-rw-r--r--src/net/tmwa/adminhandler.h2
-rw-r--r--src/net/tmwa/beinghandler.cpp2
-rw-r--r--src/net/tmwa/beinghandler.h4
-rw-r--r--src/net/tmwa/buysellhandler.h2
-rw-r--r--src/net/tmwa/charserverhandler.h2
-rw-r--r--src/net/tmwa/chathandler.h2
-rw-r--r--src/net/tmwa/gamehandler.h2
-rw-r--r--src/net/tmwa/generalhandler.h2
-rw-r--r--src/net/tmwa/gui/guildtab.h2
-rw-r--r--src/net/tmwa/gui/partytab.h2
-rw-r--r--src/net/tmwa/guildhandler.h2
-rw-r--r--src/net/tmwa/inventoryhandler.h2
-rw-r--r--src/net/tmwa/itemhandler.h2
-rw-r--r--src/net/tmwa/loginhandler.h2
-rw-r--r--src/net/tmwa/messagehandler.h2
-rw-r--r--src/net/tmwa/messagein.h2
-rw-r--r--src/net/tmwa/messageout.h4
-rw-r--r--src/net/tmwa/network.h2
-rw-r--r--src/net/tmwa/npchandler.h2
-rw-r--r--src/net/tmwa/partyhandler.h2
-rw-r--r--src/net/tmwa/playerhandler.h2
-rw-r--r--src/net/tmwa/protocol.h23
-rw-r--r--src/net/tmwa/questhandler.h2
-rw-r--r--src/net/tmwa/skillhandler.h2
-rw-r--r--src/net/tmwa/tradehandler.h2
-rw-r--r--src/normalopenglgraphics.h2
-rw-r--r--src/notifications.h2
-rw-r--r--src/particle.h125
-rw-r--r--src/particleemitter.h33
-rw-r--r--src/particleemitterprop.h2
-rw-r--r--src/party.h2
-rw-r--r--src/playerrelations.h12
-rw-r--r--src/position.h2
-rw-r--r--src/properties.h1
-rw-r--r--src/resources/animation.h1
-rw-r--r--src/resources/atlasmanager.h2
-rw-r--r--src/resources/beinginfo.h2
-rw-r--r--src/resources/chardb.h2
-rw-r--r--src/resources/colordb.h2
-rw-r--r--src/resources/cursor.cpp2
-rw-r--r--src/resources/cursor.h2
-rw-r--r--src/resources/dye.h2
-rw-r--r--src/resources/emotedb.h2
-rw-r--r--src/resources/image.h7
-rw-r--r--src/resources/itemdb.h2
-rw-r--r--src/resources/iteminfo.h12
-rw-r--r--src/resources/mapdb.h2
-rw-r--r--src/resources/resourcemanager.h1
-rw-r--r--src/resources/soundeffect.h2
-rw-r--r--src/resources/spritedef.h4
-rw-r--r--src/resources/wallpaper.h2
-rw-r--r--src/spellmanager.h2
-rw-r--r--src/sprite.h2
-rw-r--r--src/statuseffect.h2
-rw-r--r--src/test/testlauncher.h4
-rw-r--r--src/test/testmain.h2
-rw-r--r--src/text.h2
-rw-r--r--src/textmanager.h2
-rw-r--r--src/units.h2
-rw-r--r--src/utils/checkutils.h2
-rw-r--r--src/utils/gettext.h2
-rw-r--r--src/utils/langs.h2
-rw-r--r--src/utils/mathutils.h2
-rw-r--r--src/utils/mutex.h4
-rw-r--r--src/utils/paths.h2
-rw-r--r--src/utils/perfomance.h10
-rw-r--r--src/utils/physfstools.h4
-rw-r--r--src/utils/process.h2
-rw-r--r--src/utils/stringutils.h10
-rw-r--r--src/utils/translation/podict.h4
-rw-r--r--src/utils/translation/poparser.h2
-rw-r--r--src/utils/translation/translationmanager.h2
-rw-r--r--src/utils/xml.h4
-rw-r--r--src/variabledata.h2
-rw-r--r--src/vector.h2
282 files changed, 588 insertions, 639 deletions
diff --git a/src/actor.h b/src/actor.h
index 461758b9a..87e35b002 100644
--- a/src/actor.h
+++ b/src/actor.h
@@ -139,4 +139,4 @@ private:
Actors::iterator mMapActor;
};
-#endif // ACTOR_H
+#endif // ACTOR_H
diff --git a/src/actorsprite.h b/src/actorsprite.h
index d11205bd1..5a57b91a6 100644
--- a/src/actorsprite.h
+++ b/src/actorsprite.h
@@ -247,4 +247,4 @@ private:
ActorSpriteListeners mActorSpriteListeners;
};
-#endif // ACTORSPRITE_H
+#endif // ACTORSPRITE_H
diff --git a/src/actorspritelistener.h b/src/actorspritelistener.h
index 535b4254d..6b75f957b 100644
--- a/src/actorspritelistener.h
+++ b/src/actorspritelistener.h
@@ -41,4 +41,4 @@ class ActorSpriteListener
virtual void actorSpriteDestroyed(const ActorSprite &actorSprite) = 0;
};
-#endif // ACTORSPRITELISTENER_H
+#endif // ACTORSPRITELISTENER_H
diff --git a/src/actorspritemanager.h b/src/actorspritemanager.h
index cdf85e471..758714d6a 100644
--- a/src/actorspritemanager.h
+++ b/src/actorspritemanager.h
@@ -145,8 +145,8 @@ class ActorSpriteManager final: public ConfigListener
Being *findNearestLivingBeing(const Being *const aroundBeing,
const int maxTileDist,
const ActorSprite::Type
- type = Being::UNKNOWN
- ) const A_WARN_UNUSED;
+ type = Being::UNKNOWN)
+ const A_WARN_UNUSED;
/**
* Finds a being by name and (optionally) by type.
@@ -159,8 +159,8 @@ class ActorSpriteManager final: public ConfigListener
* Finds a nearest being by name and (optionally) by type.
*/
Being *findNearestByName(const std::string &name,
- const Being::Type &type = Being::UNKNOWN
- ) const A_WARN_UNUSED;
+ const Being::Type &type = Being::UNKNOWN)
+ const A_WARN_UNUSED;
/**
* Heal all players in distance.
@@ -289,7 +289,7 @@ class ActorSpriteManager final: public ConfigListener
int getAttackMobIndex(const std::string &name) const A_WARN_UNUSED;
- int getPriorityAttackMobIndex(const std::string &name)
+ int getPriorityAttackMobIndex(const std::string &name)
const A_WARN_UNUSED;
int getPickupItemIndex(const std::string &name) const A_WARN_UNUSED;
@@ -352,4 +352,4 @@ class ActorSpriteManager final: public ConfigListener
extern ActorSpriteManager *actorSpriteManager;
-#endif // ACTORSPRITEMANAGER_H
+#endif // ACTORSPRITEMANAGER_H
diff --git a/src/animationdelayload.h b/src/animationdelayload.h
index 0708c1f1b..9a12a527f 100644
--- a/src/animationdelayload.h
+++ b/src/animationdelayload.h
@@ -51,4 +51,4 @@ class AnimationDelayLoad final
std::string mAction;
};
-#endif // ANIMATIONDELAYLOAD_H
+#endif // ANIMATIONDELAYLOAD_H
diff --git a/src/auctionmanager.h b/src/auctionmanager.h
index d82f1beb0..55fd9efde 100644
--- a/src/auctionmanager.h
+++ b/src/auctionmanager.h
@@ -57,4 +57,4 @@ class AuctionManager final
extern AuctionManager *auctionManager;
-#endif // AUCTIONMANAGER_H
+#endif // AUCTIONMANAGER_H
diff --git a/src/avatar.h b/src/avatar.h
index 2e84360d3..68206bb19 100644
--- a/src/avatar.h
+++ b/src/avatar.h
@@ -193,4 +193,4 @@ protected:
std::string mIp;
};
-#endif // AVATAR_H
+#endif // AVATAR_H
diff --git a/src/being.h b/src/being.h
index 40f29a58d..2f8b21cd4 100644
--- a/src/being.h
+++ b/src/being.h
@@ -943,7 +943,6 @@ class Being : public ActorSprite, public ConfigListener
int mAttackRange;
private:
-
/**
* Calculates the offset in the given directions.
* If walking in direction 'neg' the value is negated.
diff --git a/src/client.cpp b/src/client.cpp
index 08fd2ab27..0562094c5 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -341,8 +341,8 @@ void Client::gameInit()
if (lang.empty())
lang = std::string(_nl_locale_name_default());
- putenv((char*)("LANG=" + lang).c_str());
- putenv((char*)("LANGUAGE=" + lang).c_str());
+ putenv(const_cast<char*>(("LANG=" + lang).c_str()));
+ putenv(const_cast<char*>(("LANGUAGE=" + lang).c_str()));
// mingw doesn't like LOCALEDIR to be defined for some reason
if (lang != "C")
bindTextDomain("manaplus", "translations/");
@@ -708,11 +708,14 @@ void Client::setEnv(const char *const name, const char *const value)
if (!name || !value)
return;
#ifdef WIN32
- if (putenv((char*)(std::string(name) + "=" + value).c_str()))
+ if (putenv(reinterpret_cast<char*>((std::string(name)
+ + "=" + value).c_str())))
#else
if (setenv(name, value, 1))
#endif
+ {
logger->log("setenv failed: %s=%s", name, value);
+ }
}
void Client::testsClear()
diff --git a/src/client.h b/src/client.h
index d1a3aa047..1a591c428 100644
--- a/src/client.h
+++ b/src/client.h
@@ -51,8 +51,6 @@ class QuitDialog;
*/
static const int MILLISECONDS_IN_A_TICK = 10;
-//manaserv uses 9601
-//static const short DEFAULT_PORT = 9601;
static const short DEFAULT_PORT = 6901;
extern volatile int fps;
@@ -93,32 +91,32 @@ enum State
STATE_PRE_LOGIN,
STATE_LOGIN,
STATE_LOGIN_ATTEMPT,
- STATE_WORLD_SELECT, // 5
+ STATE_WORLD_SELECT, // 5
STATE_WORLD_SELECT_ATTEMPT,
STATE_UPDATE,
STATE_LOAD_DATA,
STATE_GET_CHARACTERS,
- STATE_CHAR_SELECT, // 10
+ STATE_CHAR_SELECT, // 10
STATE_CONNECT_GAME,
STATE_GAME,
- STATE_CHANGE_MAP, // Switch map-server/gameserver
+ STATE_CHANGE_MAP, // Switch map-server/gameserver
STATE_LOGIN_ERROR,
- STATE_ACCOUNTCHANGE_ERROR, // 15
+ STATE_ACCOUNTCHANGE_ERROR, // 15
STATE_REGISTER_PREP,
STATE_REGISTER,
STATE_REGISTER_ATTEMPT,
STATE_CHANGEPASSWORD,
- STATE_CHANGEPASSWORD_ATTEMPT, // 20
+ STATE_CHANGEPASSWORD_ATTEMPT, // 20
STATE_CHANGEPASSWORD_SUCCESS,
STATE_CHANGEEMAIL,
STATE_CHANGEEMAIL_ATTEMPT,
STATE_CHANGEEMAIL_SUCCESS,
- STATE_UNREGISTER, // 25
+ STATE_UNREGISTER, // 25
STATE_UNREGISTER_ATTEMPT,
STATE_UNREGISTER_SUCCESS,
STATE_SWITCH_SERVER,
STATE_SWITCH_LOGIN,
- STATE_SWITCH_CHARACTER, // 30
+ STATE_SWITCH_CHARACTER, // 30
STATE_LOGOUT_ATTEMPT,
STATE_WAIT,
STATE_EXIT,
@@ -407,4 +405,4 @@ private:
int mButtonSpacing;
};
-#endif // CLIENT_H
+#endif // CLIENT_H
diff --git a/src/commandhandler.h b/src/commandhandler.h
index 08174ddc6..cd265beb5 100644
--- a/src/commandhandler.h
+++ b/src/commandhandler.h
@@ -72,4 +72,4 @@ class CommandHandler final
extern CommandHandler *commandHandler;
-#endif // COMMANDHANDLER_H
+#endif // COMMANDHANDLER_H
diff --git a/src/commands.h b/src/commands.h
index 350f80469..1e1e10d65 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -115,7 +115,7 @@ namespace Commands
decHandler(execute);
void replaceVars(std::string &str);
-}
+} // namespace Commands
static const CommandInfo commands[] =
{
@@ -195,4 +195,4 @@ static const CommandInfo commands[] =
#undef decHandler
-#endif // COMMANDS_H
+#endif // COMMANDS_H
diff --git a/src/compoundsprite.h b/src/compoundsprite.h
index 777b09363..6049cdeb9 100644
--- a/src/compoundsprite.h
+++ b/src/compoundsprite.h
@@ -159,4 +159,4 @@ private:
static bool mEnableDelay;
};
-#endif // COMPOUNDSPRITE_H
+#endif // COMPOUNDSPRITE_H
diff --git a/src/configuration.h b/src/configuration.h
index 1d703fd99..16c301ce4 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -161,7 +161,7 @@ class ConfigurationObject
}
else
{
- nextobj->clear(); // you never know...
+ nextobj->clear(); // you never know...
}
}
@@ -346,9 +346,10 @@ class Configuration final : public ConfigurationObject
typedef ListenerMap::iterator ListenerMapIterator;
ListenerMap mListenerMap;
- std::string mConfigPath; /**< Location of config file */
- DefaultsData *mDefaultsData; /**< Defaults of value
- for a given key */
+ // Location of config file
+ std::string mConfigPath;
+ /// Defaults of value for a given key
+ DefaultsData *mDefaultsData;
std::string mDirectory;
std::string mFilename;
bool mUseResManager;
diff --git a/src/debug.h b/src/debug.h
index 39e5c4434..35edf12a0 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -20,11 +20,11 @@
#include "localconsts.h"
-//#define DEBUG_JOYSTICK 1
+// #define DEBUG_JOYSTICK 1
#ifdef ENABLE_MEM_DEBUG
-//define _DEBUG_NEW_EMULATE_MALLOC 1
+// #define _DEBUG_NEW_EMULATE_MALLOC 1
#include "debug/debug_new.h"
#define reportFalse(val) reportFalse1(val, __FILE__, __LINE__)
diff --git a/src/debug/debug_new.h b/src/debug/debug_new.h
index 77659b27a..00861f0bf 100644
--- a/src/debug/debug_new.h
+++ b/src/debug/debug_new.h
@@ -108,7 +108,8 @@ void operator delete[](void*) throw();
extern bool new_autocheck_flag; // default to true: call check_leaks() on exit
extern bool new_verbose_flag; // default to false: no verbose information
extern FILE* new_output_fp; // default to stderr: output to console
-extern const char* new_progname; // default to NULL; should be assigned argv[0]
+extern const char* new_progname; // default to NULL; should be
+ // assigned argv[0]
/**
* @def DEBUG_NEW
@@ -180,4 +181,4 @@ public:
/** Counting object for each file including debug_new.h. */
static __debug_new_counter __debug_new_count;
-#endif // M_DEBUG_NEW_H
+#endif // M_DEBUG_NEW_H
diff --git a/src/debug/fast_mutex.h b/src/debug/fast_mutex.h
index 28a79f287..6fe51e6d8 100644
--- a/src/debug/fast_mutex.h
+++ b/src/debug/fast_mutex.h
@@ -178,7 +178,7 @@
fast_mutex(const fast_mutex&);
fast_mutex& operator=(const fast_mutex&);
};
-# endif // _PTHREADS
+# endif // _PTHREADS
# ifdef _WIN32THREADS
# include <windows.h>
@@ -247,7 +247,7 @@
fast_mutex(const fast_mutex&);
fast_mutex& operator=(const fast_mutex&);
};
-# endif // _WIN32THREADS
+# endif // _WIN32THREADS
# ifdef _NOTHREADS
/**
@@ -293,7 +293,7 @@
fast_mutex(const fast_mutex&);
fast_mutex& operator=(const fast_mutex&);
};
-# endif // _NOTHREADS
+# endif // _NOTHREADS
/** An acquistion-on-initialization lock class based on fast_mutex. */
class fast_mutex_autolock
@@ -313,4 +313,4 @@ private:
fast_mutex_autolock& operator=(const fast_mutex_autolock&);
};
-#endif // M_FAST_MUTEX_H
+#endif // M_FAST_MUTEX_H
diff --git a/src/debug/static_assert.h b/src/debug/static_assert.h
index 8510c1597..5d5a148e7 100644
--- a/src/debug/static_assert.h
+++ b/src/debug/static_assert.h
@@ -50,4 +50,4 @@ template <> struct __nvwa_compile_time_error<true> {};
(void)ERROR_##_Msg; \
}
-#endif // STATIC_ASSERT
+#endif // STATIC_ASSERT
diff --git a/src/dropshortcut.h b/src/dropshortcut.h
index 6bfd24bf1..b94a3c7a3 100644
--- a/src/dropshortcut.h
+++ b/src/dropshortcut.h
@@ -149,7 +149,6 @@ class DropShortcut final
void clear(const bool isSave = true);
private:
-
/**
* Drop item in cicle.
*/
diff --git a/src/effectmanager.h b/src/effectmanager.h
index 95ecc3439..9e3b2258d 100644
--- a/src/effectmanager.h
+++ b/src/effectmanager.h
@@ -80,4 +80,4 @@ class EffectManager final
extern EffectManager *effectManager;
-#endif // EFFECT_MANAGER_H
+#endif // EFFECT_MANAGER_H
diff --git a/src/emoteshortcut.h b/src/emoteshortcut.h
index 945976077..95cd5c6dc 100644
--- a/src/emoteshortcut.h
+++ b/src/emoteshortcut.h
@@ -119,9 +119,8 @@ class EmoteShortcut final
*/
void save() const;
- unsigned char mEmotes[SHORTCUT_EMOTES]; /**< The emote stored. */
- unsigned char mEmoteSelected; /**< The emote held
- by cursor. */
+ unsigned char mEmotes[SHORTCUT_EMOTES]; // The emote stored.
+ unsigned char mEmoteSelected; // The emote held by cursor.
};
diff --git a/src/game.h b/src/game.h
index c40c202d3..0b3bc988c 100644
--- a/src/game.h
+++ b/src/game.h
@@ -32,7 +32,6 @@
static const int MAX_LASTKEYS = 10;
extern volatile int cur_time;
-//extern std::string map_path; // TODO: Get rid of this global
class Map;
class WindowMenu;
diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h
index f69392c69..09b4305c9 100644
--- a/src/graphicsvertexes.h
+++ b/src/graphicsvertexes.h
@@ -175,4 +175,4 @@ class ImageCollection final
extern unsigned int vertexBufSize;
#endif
-#endif // GRAPHICSVERTEXES_H
+#endif // GRAPHICSVERTEXES_H
diff --git a/src/gui/beingpopup.h b/src/gui/beingpopup.h
index b18abe4e2..82b04ca85 100644
--- a/src/gui/beingpopup.h
+++ b/src/gui/beingpopup.h
@@ -60,4 +60,4 @@ class BeingPopup final : public Popup
Label *mBeingComment;
};
-#endif // BEINGPOPUP_H
+#endif // BEINGPOPUP_H
diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h
index 9d6bf447c..1dd552c80 100644
--- a/src/gui/buydialog.h
+++ b/src/gui/buydialog.h
@@ -54,12 +54,12 @@ class BuyDialog final : public Window,
*
* @see Window::Window
*/
- BuyDialog(const int npcId);
+ explicit BuyDialog(const int npcId);
/**
* Constructor.
*/
- BuyDialog(std::string nick);
+ explicit BuyDialog(std::string nick);
A_DELETE_COPY(BuyDialog)
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index 36c06fcbc..b6b2c5285 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -46,7 +46,7 @@ class ChangeEmailDialog final : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
- ChangeEmailDialog(LoginData *const data);
+ explicit ChangeEmailDialog(LoginData *const data);
A_DELETE_COPY(ChangeEmailDialog)
@@ -78,4 +78,4 @@ class ChangeEmailDialog final : public Window, public gcn::ActionListener
LoginData *mLoginData;
};
-#endif // GUI_CHANGEEMAIL_H
+#endif // GUI_CHANGEEMAIL_H
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index 6eb6bd48b..a7563ce52 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -46,7 +46,7 @@ class ChangePasswordDialog final : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
- ChangePasswordDialog(LoginData *const data);
+ explicit ChangePasswordDialog(LoginData *const data);
A_DELETE_COPY(ChangePasswordDialog)
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index 6b12ea569..0cfe03ebd 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -154,4 +154,4 @@ class CharCreateDialog final : public Window,
unsigned mDirection;
};
-#endif // CHAR_CREATE_DIALOG_H
+#endif // CHAR_CREATE_DIALOG_H
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 8c1b92522..5b4ba47af 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -63,7 +63,7 @@ class CharSelectDialog final : public Window,
/**
* Constructor.
*/
- CharSelectDialog(LoginData *const data);
+ explicit CharSelectDialog(LoginData *const data);
A_DELETE_COPY(CharSelectDialog)
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index 1798ac63c..f8d9ae7da 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -337,16 +337,16 @@ class ChatWindow final : public Window,
TabMap mWhispers;
typedef History::iterator HistoryIterator;
- History mHistory; /**< Command history. */
- HistoryIterator mCurHist; /**< History iterator. */
+ History mHistory; /**< Command history. */
+ HistoryIterator mCurHist; /**< History iterator. */
typedef std::list<std::string> Commands;
typedef Commands::iterator CommandsIterator;
- History mCommands; /**< Command list. */
+ History mCommands; /**< Command list. */
History mCustomWords;
- bool mReturnToggles; /**< Marks whether <Return> toggles the chat log
- or not */
+ bool mReturnToggles; // Marks whether <Return> toggles the chat log
+ // or not
StringVect mTradeFilter;
diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp
index 58a07dff4..6227afd7f 100644
--- a/src/gui/didyouknowwindow.cpp
+++ b/src/gui/didyouknowwindow.cpp
@@ -88,7 +88,7 @@ DidYouKnowWindow::DidYouKnowWindow():
loadWindowState();
enableVisibleSound(true);
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
void DidYouKnowWindow::action(const gcn::ActionEvent &event)
diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h
index 7f611136b..f481fa789 100644
--- a/src/gui/editserverdialog.h
+++ b/src/gui/editserverdialog.h
@@ -113,4 +113,4 @@ class EditServerDialog final : public Window,
int mIndex;
};
-#endif // EDITSERVERDIALOG_H
+#endif // EDITSERVERDIALOG_H
diff --git a/src/gui/gui.h b/src/gui/gui.h
index a0ea4f496..04d76e538 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -58,7 +58,7 @@ class Gui final : public gcn::Gui
/**
* Constructor.
*/
- Gui(Graphics *const screen);
+ explicit Gui(Graphics *const screen);
A_DELETE_COPY(Gui)
@@ -188,4 +188,4 @@ extern SDLInput *guiInput; /**< GUI input */
*/
extern SDLFont *boldFont;
-#endif // GUI_H
+#endif // GUI_H
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index ae8fa5b15..c489d9278 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -240,7 +240,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
enableVisibleSound(true);
slotsChanged(mInventory);
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
if (!isMainInventory())
setVisible(true);
}
diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h
index f1d9aabce..1ed3f4e59 100644
--- a/src/gui/itemamountwindow.h
+++ b/src/gui/itemamountwindow.h
@@ -122,4 +122,4 @@ class ItemAmountWindow final : public Window,
int mPrice;
};
-#endif // ITEM_AMOUNT_WINDOW_H
+#endif // ITEM_AMOUNT_WINDOW_H
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 4817b8851..cf46e0661 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -78,4 +78,4 @@ class ItemPopup final : public Popup
gcn::Color getColor(const ItemType type) const;
};
-#endif // ITEMPOPUP_H
+#endif // ITEMPOPUP_H
diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h
index d8d4347e3..f2edf6850 100644
--- a/src/gui/ministatuswindow.h
+++ b/src/gui/ministatuswindow.h
@@ -66,7 +66,7 @@ class MiniStatusWindow final : public Popup,
void updateStatus();
- void logic() override; // Updates icons
+ void logic() override;
void draw(gcn::Graphics *graphics) override;
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index 433a4472f..f8c50ddff 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -60,7 +60,7 @@ class NpcDialog final : public Window, public gcn::ActionListener,
*
* @see Window::Window
*/
- NpcDialog(const int npcId);
+ explicit NpcDialog(const int npcId);
A_DELETE_COPY(NpcDialog)
@@ -223,7 +223,6 @@ class NpcDialog final : public Window, public gcn::ActionListener,
// Used for the main input area
BrowserBox *mTextBox;
ScrollArea *mScrollArea;
- //TextBox *mTextBox;
std::string mText;
std::string mNewText;
@@ -275,4 +274,4 @@ class NpcDialog final : public Window, public gcn::ActionListener,
bool mShowAvatar;
};
-#endif // NPCDIALOG_H
+#endif // NPCDIALOG_H
diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h
index 6dfd2bd48..261e6e482 100644
--- a/src/gui/npcpostdialog.h
+++ b/src/gui/npcpostdialog.h
@@ -36,7 +36,7 @@ public:
/**
* Constructor
*/
- NpcPostDialog(const int npcId);
+ explicit NpcPostDialog(const int npcId);
A_DELETE_COPY(NpcPostDialog)
diff --git a/src/gui/palette.h b/src/gui/palette.h
index dbb8327c6..30c8acec9 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -154,7 +154,7 @@ class Palette
/**
* Constructor
*/
- Palette(const int size);
+ explicit Palette(const int size);
/**
* Destructor
diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h
index ad02c5397..8872189cb 100644
--- a/src/gui/questswindow.h
+++ b/src/gui/questswindow.h
@@ -92,13 +92,13 @@ class QuestsWindow final : public Window, public gcn::ActionListener
BrowserBox *mText;
ScrollArea *mTextScrollArea;
Button *mCloseButton;
- //quest variables: var, value
+ // quest variables: var, value
std::map<int, int> mVars;
- //quests: var, quests
+ // quests: var, quests
std::map<int, std::vector<QuestItem*> > mQuests;
std::vector<QuestEffect*> mAllEffects;
std::vector<const QuestEffect*> mMapEffects;
- //npc effects for current map and values: npc, effect
+ // npc effects for current map and values: npc, effect
NpcQuestEffectMap mNpcEffects;
std::vector<QuestItem*> mQuestLinks;
Image *mCompleteIcon;
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 7f570bc1c..e6181746e 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -47,7 +47,7 @@ class QuitDialog final : public Window, public gcn::ActionListener,
*
* @pointerToMe will be set to NULL when the QuitDialog is destroyed
*/
- QuitDialog(QuitDialog **const pointerToMe);
+ explicit QuitDialog(QuitDialog **const pointerToMe);
A_DELETE_COPY(QuitDialog)
diff --git a/src/gui/registerdialog.h b/src/gui/registerdialog.h
index 02995de85..34bb0bac8 100644
--- a/src/gui/registerdialog.h
+++ b/src/gui/registerdialog.h
@@ -70,7 +70,7 @@ class RegisterDialog final : public Window, public gcn::ActionListener,
*
* @see Window::Window
*/
- RegisterDialog(LoginData *const loginData);
+ explicit RegisterDialog(LoginData *const loginData);
A_DELETE_COPY(RegisterDialog)
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h
index 58f05424a..e6983a37a 100644
--- a/src/gui/sdlinput.h
+++ b/src/gui/sdlinput.h
@@ -124,7 +124,7 @@ namespace Key
UP,
DOWN
};
-}
+} // namespace Key
/**
* SDL implementation of Input.
@@ -132,7 +132,6 @@ namespace Key
class SDLInput final : public gcn::Input
{
public:
-
/**
* Constructor.
*/
diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h
index 00f281b2d..2002c67e4 100644
--- a/src/gui/selldialog.h
+++ b/src/gui/selldialog.h
@@ -53,12 +53,12 @@ class SellDialog final : public Window,
*
* @see Window::Window
*/
- SellDialog(const int npcId);
+ explicit SellDialog(const int npcId);
/**
* Constructor.
*/
- SellDialog(std::string nick);
+ explicit SellDialog(std::string nick);
A_DELETE_COPY(SellDialog)
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index af67129e0..844840f8d 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -133,7 +133,7 @@ Setup::Setup():
center();
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
setInGame(false);
enableVisibleSound(true);
}
diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h
index 93544e52a..1a4c1c074 100644
--- a/src/gui/setup_audio.h
+++ b/src/gui/setup_audio.h
@@ -32,7 +32,7 @@
class Setup_Audio final : public SetupTabScroll
{
public:
- Setup_Audio(const Widget2 *const widget);
+ explicit Setup_Audio(const Widget2 *const widget);
A_DELETE_COPY(Setup_Audio)
diff --git a/src/gui/setup_chat.h b/src/gui/setup_chat.h
index 2e519f11c..53818caf4 100644
--- a/src/gui/setup_chat.h
+++ b/src/gui/setup_chat.h
@@ -33,7 +33,7 @@ class EditDialog;
class Setup_Chat final : public SetupTabScroll
{
public:
- Setup_Chat(const Widget2 *const widget);
+ explicit Setup_Chat(const Widget2 *const widget);
A_DELETE_COPY(Setup_Chat)
diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h
index 380ef54a4..62241f6e3 100644
--- a/src/gui/setup_colors.h
+++ b/src/gui/setup_colors.h
@@ -41,7 +41,7 @@ class Setup_Colors final : public SetupTab,
public gcn::SelectionListener
{
public:
- Setup_Colors(const Widget2 *const widget);
+ explicit Setup_Colors(const Widget2 *const widget);
A_DELETE_COPY(Setup_Colors)
@@ -94,4 +94,4 @@ class Setup_Colors final : public SetupTab,
void updateGradType();
};
-#endif // SETUP_COLORS_H
+#endif // SETUP_COLORS_H
diff --git a/src/gui/setup_input.h b/src/gui/setup_input.h
index 2a7f13dd7..6548b70ba 100644
--- a/src/gui/setup_input.h
+++ b/src/gui/setup_input.h
@@ -44,7 +44,7 @@ class Setup_Input final : public SetupTab
/**
* Constructor
*/
- Setup_Input(const Widget2 *const widget);
+ explicit Setup_Input(const Widget2 *const widget);
A_DELETE_COPY(Setup_Input)
diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h
index d703c6ae7..9807df2d2 100644
--- a/src/gui/setup_joystick.h
+++ b/src/gui/setup_joystick.h
@@ -36,7 +36,7 @@ class NamesModel;
class Setup_Joystick final : public SetupTab
{
public:
- Setup_Joystick(const Widget2 *const widget);
+ explicit Setup_Joystick(const Widget2 *const widget);
A_DELETE_COPY(Setup_Joystick)
diff --git a/src/gui/setup_other.h b/src/gui/setup_other.h
index e5b148017..2f0fdaf04 100644
--- a/src/gui/setup_other.h
+++ b/src/gui/setup_other.h
@@ -34,7 +34,7 @@ class TextField;
class Setup_Other final : public SetupTabScroll
{
public:
- Setup_Other(const Widget2 *const widget);
+ explicit Setup_Other(const Widget2 *const widget);
A_DELETE_COPY(Setup_Other)
diff --git a/src/gui/setup_perfomance.h b/src/gui/setup_perfomance.h
index 7cfcee3b4..b3c237bd7 100644
--- a/src/gui/setup_perfomance.h
+++ b/src/gui/setup_perfomance.h
@@ -34,7 +34,7 @@ class NamesModel;
class Setup_Perfomance final : public SetupTabScroll
{
public:
- Setup_Perfomance(const Widget2 *const widget);
+ explicit Setup_Perfomance(const Widget2 *const widget);
A_DELETE_COPY(Setup_Perfomance)
diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h
index 759ec2c7f..8f9c6a4ef 100644
--- a/src/gui/setup_players.h
+++ b/src/gui/setup_players.h
@@ -33,7 +33,7 @@ class EditDialog;
class Setup_Players final : public SetupTabScroll
{
public:
- Setup_Players(const Widget2 *const widget);
+ explicit Setup_Players(const Widget2 *const widget);
A_DELETE_COPY(Setup_Players)
diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h
index 92ebf9ec1..3ed9e7189 100644
--- a/src/gui/setup_relations.h
+++ b/src/gui/setup_relations.h
@@ -47,7 +47,7 @@ class Setup_Relations final : public SetupTab,
public PlayerRelationsListener
{
public:
- Setup_Relations(const Widget2 *const widget);
+ explicit Setup_Relations(const Widget2 *const widget);
A_DELETE_COPY(Setup_Relations)
diff --git a/src/gui/setup_theme.h b/src/gui/setup_theme.h
index 7f0015311..9357f629e 100644
--- a/src/gui/setup_theme.h
+++ b/src/gui/setup_theme.h
@@ -39,7 +39,7 @@ class ThemesModel;
class Setup_Theme final : public SetupTab
{
public:
- Setup_Theme(const Widget2 *const widget);
+ explicit Setup_Theme(const Widget2 *const widget);
A_DELETE_COPY(Setup_Theme)
diff --git a/src/gui/setup_touch.h b/src/gui/setup_touch.h
index eb8c15c2a..e15e9de4d 100644
--- a/src/gui/setup_touch.h
+++ b/src/gui/setup_touch.h
@@ -31,7 +31,7 @@ class TextField;
class Setup_Touch final : public SetupTabScroll
{
public:
- Setup_Touch(const Widget2 *const widget);
+ explicit Setup_Touch(const Widget2 *const widget);
A_DELETE_COPY(Setup_Touch)
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index dc1a180b3..754227a2f 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -43,7 +43,7 @@ class TextDialog;
class Setup_Video final : public SetupTab, public gcn::KeyListener
{
public:
- Setup_Video(const Widget2 *const widget);
+ explicit Setup_Video(const Widget2 *const widget);
A_DELETE_COPY(Setup_Video)
diff --git a/src/gui/setup_visual.h b/src/gui/setup_visual.h
index 82c1bfe5e..2b8081cfd 100644
--- a/src/gui/setup_visual.h
+++ b/src/gui/setup_visual.h
@@ -29,7 +29,7 @@ class NamesModel;
class Setup_Visual final : public SetupTabScroll
{
public:
- Setup_Visual(const Widget2 *const widget);
+ explicit Setup_Visual(const Widget2 *const widget);
A_DELETE_COPY(Setup_Visual)
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 0f56e4b96..38815898c 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -31,8 +31,6 @@
#include <string>
-//#include "debug.h"
-
struct SetupActionData final
{
std::string name;
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 3c65358ea..893809def 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -1272,8 +1272,7 @@ SocialWindow::SocialWindow() :
place(2, 0, mLeaveButton);
place(0, 1, mTabs, 4, 4);
- widgetResized(nullptr);
-
+ widgetResized(gcn::Event(nullptr));
loadWindowState();
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 68abef2a4..9695bbb0e 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -163,4 +163,4 @@ protected:
extern SocialWindow *socialWindow;
-#endif // SOCIALWINDOW_H
+#endif // SOCIALWINDOW_H
diff --git a/src/gui/spellpopup.h b/src/gui/spellpopup.h
index 4a87f7d98..01a283dbc 100644
--- a/src/gui/spellpopup.h
+++ b/src/gui/spellpopup.h
@@ -69,4 +69,4 @@ class SpellPopup final : public Popup
Label *mItemComment;
};
-#endif // SPELLPOPUP_H
+#endif // SPELLPOPUP_H
diff --git a/src/gui/statuspopup.h b/src/gui/statuspopup.h
index 1547d9cfc..0dd0f4486 100644
--- a/src/gui/statuspopup.h
+++ b/src/gui/statuspopup.h
@@ -83,4 +83,4 @@ class StatusPopup final : public Popup
Label *mCameraMode;
};
-#endif // StatusPopup_H
+#endif // StatusPopup_H
diff --git a/src/gui/textcommandeditor.h b/src/gui/textcommandeditor.h
index c364a70b0..86d1c7c7d 100644
--- a/src/gui/textcommandeditor.h
+++ b/src/gui/textcommandeditor.h
@@ -48,7 +48,7 @@ class TextCommandEditor final : public Window, public gcn::ActionListener
/**
* Constructor.
*/
- TextCommandEditor(TextCommand *const command);
+ explicit TextCommandEditor(TextCommand *const command);
A_DELETE_COPY(TextCommandEditor)
diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h
index e0dfe60ec..f5f63473b 100644
--- a/src/gui/textpopup.h
+++ b/src/gui/textpopup.h
@@ -79,4 +79,4 @@ class TextPopup final : public Popup
Label *mText3;
};
-#endif // TEXTPOPUP_H
+#endif // TEXTPOPUP_H
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index 19428b78b..c6a5b3309 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -46,7 +46,7 @@ class UnRegisterDialog final : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
- UnRegisterDialog(LoginData *const loginData);
+ explicit UnRegisterDialog(LoginData *const loginData);
A_DELETE_COPY(UnRegisterDialog)
diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h
index 0fd7dc93d..fb94b0e97 100644
--- a/src/gui/updaterwindow.h
+++ b/src/gui/updaterwindow.h
@@ -186,7 +186,8 @@ private:
/** The new progress value to be set in the logic method. */
float mDownloadProgress;
- /** The mutex used to guard access to mNewLabelCaption and mDownloadProgress. */
+ // The mutex used to guard access to mNewLabelCaption
+ // and mDownloadProgress.
Mutex mDownloadMutex;
/** The Adler32 checksum of the file currently downloading. */
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index c42a7aa27..9077da6c0 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -295,7 +295,7 @@ void UserPalette::addColor(const unsigned type, const unsigned rgb,
rgbValue = atox(rgbString);
else
rgbValue = atoi(rgbString.c_str());
- const gcn::Color &trueCol = rgbValue;
+ const gcn::Color &trueCol = gcn::Color(rgbValue);
grad = static_cast<GradientType>(config.getValue(configName + "Gradient",
static_cast<int>(grad)));
delay = config.getValueInt(configName + "Delay", delay);
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 85d37d5c8..21bc84e6c 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -231,4 +231,4 @@ class UserPalette final : public Palette, public gcn::ListModel
extern UserPalette *userPalette;
-#endif // USER_PALETTE_H
+#endif // USER_PALETTE_H
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 0c1a2998d..75e8a95d6 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -122,7 +122,7 @@ WhoIsOnline::WhoIsOnline():
download();
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
config.addListener("updateOnlineList", this);
config.addListener("groupFriends", this);
mUpdateOnlineList = config.getBoolValue("updateOnlineList");
diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h
index 7bcb78d28..83828f744 100644
--- a/src/gui/widgets/battletab.h
+++ b/src/gui/widgets/battletab.h
@@ -31,7 +31,7 @@
class BattleTab final : public ChatTab
{
public:
- BattleTab(const Widget2 *const widget);
+ explicit BattleTab(const Widget2 *const widget);
A_DELETE_COPY(BattleTab)
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index 045e0d5d5..304fa1e6c 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -126,7 +126,7 @@ class BrowserBox final : public gcn::Widget,
* Sets the maximum numbers of rows in the browser box. 0 = no limit.
*/
void setMaxRow(unsigned max)
- { mMaxRows = max; };
+ { mMaxRows = max; }
/**
* Adds a text row to the browser.
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index d0431217e..90faa7d06 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -52,7 +52,7 @@ class Button final : public gcn::Button,
/**
* Default constructor.
*/
- Button(const Widget2 *const widget);
+ explicit Button(const Widget2 *const widget);
/**
* Constructor, sets the caption of the button to the given string and
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 7105f3fc4..7f27615ae 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -209,4 +209,4 @@ class ChatTab : public Tab
extern ChatTab *localChatTab;
extern ChatTab *debugChatTab;
-#endif // CHATTAB_H
+#endif // CHATTAB_H
diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h
index eb1d9b8e4..60da54672 100644
--- a/src/gui/widgets/container.h
+++ b/src/gui/widgets/container.h
@@ -45,7 +45,7 @@ class Container : public gcn::Container,
public Widget2
{
public:
- Container(const Widget2 *const widget);
+ explicit Container(const Widget2 *const widget);
~Container();
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index 9bafc0552..d08127630 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -47,7 +47,7 @@ class Label;
class Desktop final : public Container, private gcn::WidgetListener
{
public:
- Desktop(const Widget2 *const widget);
+ explicit Desktop(const Widget2 *const widget);
A_DELETE_COPY(Desktop)
@@ -71,4 +71,4 @@ class Desktop final : public Container, private gcn::WidgetListener
gcn::Color mBackgroundGrayColor;
};
-#endif // DESKTOP_H
+#endif // DESKTOP_H
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 30ce6692b..a145d708c 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -157,7 +157,6 @@ class DropDown final : public gcn::ActionListener,
bool mDroppedDown;
bool mPushed;
int mFoldedUpHeight;
-// gcn::FocusHandler mInternalFocusHandler;
bool mIsDragged;
typedef std::list<SelectionListener*> SelectionListenerList;
SelectionListenerList mSelectionListeners;
@@ -171,4 +170,4 @@ class DropDown final : public gcn::ActionListener,
static Skin *mSkin;
};
-#endif // end DROPDOWN_H
+#endif // end DROPDOWN_H
diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp
index dda201904..80a746dd4 100644
--- a/src/gui/widgets/flowcontainer.cpp
+++ b/src/gui/widgets/flowcontainer.cpp
@@ -92,5 +92,5 @@ void FlowContainer::add(gcn::Widget *widget)
Container::add(widget);
widget->setSize(mBoxWidth, mBoxHeight);
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
diff --git a/src/gui/widgets/gmtab.h b/src/gui/widgets/gmtab.h
index f0ebc7e76..cadadca7e 100644
--- a/src/gui/widgets/gmtab.h
+++ b/src/gui/widgets/gmtab.h
@@ -29,7 +29,7 @@
class GmTab final : public ChatTab
{
public:
- GmTab(const Widget2 *const widget);
+ explicit GmTab(const Widget2 *const widget);
A_DELETE_COPY(GmTab)
@@ -50,4 +50,4 @@ class GmTab final : public ChatTab
extern GmTab *gmChatTab;
-#endif // GMTAB_H
+#endif // GMTAB_H
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 0b2b4462c..08e319588 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -165,8 +165,8 @@ protected:
virtual int getColumnWidth(int i) const A_WARN_UNUSED;
private:
- int getRowForY(int y) const A_WARN_UNUSED; // -1 on error
- int getColumnForX(int x) const A_WARN_UNUSED; // -1 on error
+ int getRowForY(int y) const A_WARN_UNUSED; // -1 on error
+ int getColumnForX(int x) const A_WARN_UNUSED; // -1 on error
void recomputeDimensions();
bool mLinewiseMode;
bool mWrappingEnabled;
@@ -193,5 +193,4 @@ private:
gcn::Color mHighlightColor;
};
-
-#endif // TABLE_H
+#endif // TABLE_H
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 7d681dd8b..bae76bb72 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -74,4 +74,4 @@ class Icon final : public gcn::Widget,
Image *mImage;
};
-#endif // ICON_H
+#endif // ICON_H
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index 47a520601..a416f52c4 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -43,7 +43,7 @@ class ItemShortcutContainer final : public ShortcutContainer
/**
* Constructor. Initializes the graphic.
*/
- ItemShortcutContainer(const unsigned number);
+ explicit ItemShortcutContainer(const unsigned number);
A_DELETE_COPY(ItemShortcutContainer)
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index 6c7df3f89..39146ffd2 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -42,7 +42,7 @@ class Label final : public gcn::Label, public Widget2
/**
* Constructor.
*/
- Label(const Widget2 *const widget);
+ explicit Label(const Widget2 *const widget);
/**
* Constructor. This version of the constructor sets the label with an
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index cb0000073..267e8da6e 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -72,7 +72,6 @@ class LayoutArray final
friend class LayoutCell;
public:
-
LayoutArray();
~LayoutArray();
@@ -121,9 +120,8 @@ class LayoutArray final
void reflow(const int nX, const int nY, const int nW, const int nH);
private:
-
// Copy not allowed, as the array owns all its cells.
- LayoutArray(LayoutArray const &);
+ explicit LayoutArray(LayoutArray const &);
LayoutArray &operator=(LayoutArray const &);
/**
@@ -289,7 +287,7 @@ class LayoutCell
private:
// Copy not allowed, as the cell may own an array.
- LayoutCell(LayoutCell const &);
+ explicit LayoutCell(LayoutCell const &);
LayoutCell &operator=(LayoutCell const &);
union
@@ -365,4 +363,4 @@ class Layout final : public LayoutCell
bool mComputed;
};
-#endif // WIDGET_LAYOUT_H
+#endif // WIDGET_LAYOUT_H
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index 57448ec01..fea4efdd6 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -38,7 +38,7 @@ class LayoutHelper final : public gcn::WidgetListener
/**
* Constructor.
*/
- LayoutHelper(gcn::Container *const container);
+ explicit LayoutHelper(gcn::Container *const container);
A_DELETE_COPY(LayoutHelper)
@@ -85,4 +85,4 @@ class LayoutHelper final : public gcn::WidgetListener
gcn::Container *mContainer; /**< Managed container */
};
-#endif // LAYOUTHELPER_H
+#endif // LAYOUTHELPER_H
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 8526117a9..61ad7dae4 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -48,7 +48,7 @@ class PlayerBox final : public Widget2,
*/
PlayerBox(Being *const being, const std::string &skin = "");
- PlayerBox(std::string skin = "");
+ explicit PlayerBox(std::string skin = "");
A_DELETE_COPY(PlayerBox)
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index 1fc1dcd37..da80f59ec 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -52,4 +52,4 @@ class ProgressIndicator final : public gcn::Widget,
SimpleAnimation *mIndicator;
};
-#endif // PROGRESSINDICATOR_H
+#endif // PROGRESSINDICATOR_H
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index 860ede73e..481d18408 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -90,4 +90,4 @@ class RadioButton final : public gcn::RadioButton,
int mSpacing;
};
-#endif // RADIOBUTTON_H
+#endif // RADIOBUTTON_H
diff --git a/src/gui/widgets/setuptab.h b/src/gui/widgets/setuptab.h
index 7d0c45d17..a388daf82 100644
--- a/src/gui/widgets/setuptab.h
+++ b/src/gui/widgets/setuptab.h
@@ -40,7 +40,7 @@ class SetupTab : public Container,
public gcn::WidgetListener
{
public:
- SetupTab(const Widget2 *const widget);
+ explicit SetupTab(const Widget2 *const widget);
A_DELETE_COPY(SetupTab)
diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h
index 2417bd400..e177ba6cb 100644
--- a/src/gui/widgets/setuptabscroll.h
+++ b/src/gui/widgets/setuptabscroll.h
@@ -35,7 +35,7 @@ class VertContainer;
class SetupTabScroll : public SetupTab
{
public:
- SetupTabScroll(const Widget2 *const widget);
+ explicit SetupTabScroll(const Widget2 *const widget);
A_DELETE_COPY(SetupTabScroll)
diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h
index 954f2830a..e577916a2 100644
--- a/src/gui/widgets/shopitems.h
+++ b/src/gui/widgets/shopitems.h
@@ -50,7 +50,7 @@ class ShopItems final : public gcn::ListModel
* @param mergeDuplicates lets the Shop look for duplicate entries and
* merges them to one item.
*/
- ShopItems(const bool mergeDuplicates = false);
+ explicit ShopItems(const bool mergeDuplicates = false);
A_DELETE_COPY(ShopItems)
@@ -138,4 +138,4 @@ class ShopItems final : public gcn::ListModel
bool mMergeDuplicates;
};
-#endif // SHOPITEMS_H
+#endif // SHOPITEMS_H
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index ad58ea413..5bc63ca85 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -106,4 +106,4 @@ class ShopListBox final : public ListBox
static float mAlpha;
};
-#endif // SHOPLISTBOX_H
+#endif // SHOPLISTBOX_H
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index a6c608214..f1cc5b1b0 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -44,7 +44,7 @@ class Slider final : public gcn::Slider,
/**
* Constructor with scale start equal to 0.
*/
- Slider(const double scaleEnd = 1.0);
+ explicit Slider(const double scaleEnd = 1.0);
/**
* Constructor.
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index b07ca5598..4a0a9b351 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -83,4 +83,4 @@ class SliderList final : public Container,
int mSelectedIndex;
};
-#endif // end GUI_WIDGETS_SLIDERLIST_H
+#endif // end GUI_WIDGETS_SLIDERLIST_H
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index f879922ee..62a970c79 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -42,7 +42,7 @@ class SpellShortcutContainer final : public ShortcutContainer
/**
* Constructor. Initializes the graphic.
*/
- SpellShortcutContainer(const unsigned number);
+ explicit SpellShortcutContainer(const unsigned number);
A_DELETE_COPY(SpellShortcutContainer)
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index c1a9d37f2..40f47f6ff 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -47,7 +47,7 @@ class Tab : public gcn::BasicContainer,
public gcn::WidgetListener
{
public:
- Tab(const Widget2 *const widget);
+ explicit Tab(const Widget2 *const widget);
A_DELETE_COPY(Tab)
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index e31d4f6cd..3eb09a113 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -65,7 +65,7 @@ TabbedArea::TabbedArea(const Widget2 *const widget) :
mArrowButton[0] = new Button(this, "<", "shift_left", this);
mArrowButton[1] = new Button(this, ">", "shift_right", this);
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
TabbedArea::~TabbedArea()
@@ -329,7 +329,7 @@ void TabbedArea::setSelectedTab(Tab *tab)
if (newTab)
newTab->setCurrent();
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
int TabbedArea::getSelectedTabIndex() const
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 7c90f19ea..40c60bd49 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -48,7 +48,7 @@ class TabbedArea final : public Widget2,
/**
* Constructor.
*/
- TabbedArea(const Widget2 *const widget);
+ explicit TabbedArea(const Widget2 *const widget);
A_DELETE_COPY(TabbedArea)
diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h
index da200c52a..7e061efb1 100644
--- a/src/gui/widgets/tablemodel.h
+++ b/src/gui/widgets/tablemodel.h
@@ -159,4 +159,4 @@ protected:
std::vector<int> mWidths;
};
-#endif // TABLE_MODEL_H
+#endif // TABLE_MODEL_H
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 1ec11311a..327a7a900 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -43,7 +43,7 @@ class TextBox final : public gcn::TextBox,
/**
* Constructor.
*/
- TextBox(const Widget2 *const widget);
+ explicit TextBox(const Widget2 *const widget);
A_DELETE_COPY(TextBox)
diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h
index 19d85a645..c790a42bb 100644
--- a/src/gui/widgets/tradetab.h
+++ b/src/gui/widgets/tradetab.h
@@ -31,7 +31,7 @@
class TradeTab final : public ChatTab
{
public:
- TradeTab(const Widget2 *const widget);
+ explicit TradeTab(const Widget2 *const widget);
A_DELETE_COPY(TradeTab)
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 7cf5ece0d..5bc9fe2c2 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -73,4 +73,4 @@ class WhisperTab final : public ChatTab
std::string mNick;
};
-#endif // CHANNELTAB_H
+#endif // CHANNELTAB_H
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index d8d158cf2..053b1560f 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -33,7 +33,7 @@ class Widget2
{
}
- Widget2(const Widget2 *const widget) :
+ explicit Widget2(const Widget2 *const widget) :
mPaletteOffset(widget ? widget->mPaletteOffset : 0)
{
checkPalette();
diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h
index 660d2ab8a..27fc065fe 100644
--- a/src/gui/widgets/windowcontainer.h
+++ b/src/gui/widgets/windowcontainer.h
@@ -36,7 +36,7 @@
class WindowContainer : public Container
{
public:
- WindowContainer(const Widget2 *const widget);
+ explicit WindowContainer(const Widget2 *const widget);
void slowLogic();
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index cc152f72f..e32830c20 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -82,7 +82,7 @@ class WindowMenu final : public Container,
public gcn::MouseListener
{
public:
- WindowMenu(const Widget2 *const widget);
+ explicit WindowMenu(const Widget2 *const widget);
A_DELETE_COPY(WindowMenu)
diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h
index 6bae954f8..1e7f09771 100644
--- a/src/gui/worldselectdialog.h
+++ b/src/gui/worldselectdialog.h
@@ -52,7 +52,7 @@ class WorldSelectDialog final : public Window, public gcn::ActionListener,
*
* @see Window::Window
*/
- WorldSelectDialog(Worlds worlds);
+ explicit WorldSelectDialog(Worlds worlds);
A_DELETE_COPY(WorldSelectDialog)
@@ -75,4 +75,4 @@ class WorldSelectDialog final : public Window, public gcn::ActionListener,
Button *mChooseWorld;
};
-#endif // WORLD_SELECT_DIALOG_H
+#endif // WORLD_SELECT_DIALOG_H
diff --git a/src/guichan/include/guichan/actionevent.hpp b/src/guichan/include/guichan/actionevent.hpp
index 12baa3419..4d130501d 100644
--- a/src/guichan/include/guichan/actionevent.hpp
+++ b/src/guichan/include/guichan/actionevent.hpp
@@ -81,7 +81,6 @@ namespace gcn
class GCN_CORE_DECLSPEC ActionEvent final : public Event
{
public:
-
/**
* Constructor.
*
@@ -111,6 +110,6 @@ namespace gcn
*/
std::string mId;
};
-}
+} // namespace gcn
-#endif // GCN_ACTIONEVENT_HPP
+#endif // GCN_ACTIONEVENT_HPP
diff --git a/src/guichan/include/guichan/actionlistener.hpp b/src/guichan/include/guichan/actionlistener.hpp
index 50e3349fd..37970af5f 100644
--- a/src/guichan/include/guichan/actionlistener.hpp
+++ b/src/guichan/include/guichan/actionlistener.hpp
@@ -63,7 +63,6 @@ namespace gcn
class GCN_CORE_DECLSPEC ActionListener
{
public:
-
/**
* Destructor.
*/
@@ -79,7 +78,7 @@ namespace gcn
* @since 0.6.0
*/
virtual void action(const ActionEvent& actionEvent) = 0;
-
+
protected:
/**
* Constructor.
@@ -90,6 +89,6 @@ namespace gcn
ActionListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_ACTIONLISTENER_HPP
+#endif // end GCN_ACTIONLISTENER_HPP
diff --git a/src/guichan/include/guichan/basiccontainer.hpp b/src/guichan/include/guichan/basiccontainer.hpp
index dc307fb27..7f2d81382 100644
--- a/src/guichan/include/guichan/basiccontainer.hpp
+++ b/src/guichan/include/guichan/basiccontainer.hpp
@@ -192,6 +192,6 @@ namespace gcn
*/
WidgetList mWidgets;
};
-}
+} // namespace gcn
-#endif // end GCN_BASICCONTAINER_HPP
+#endif // end GCN_BASICCONTAINER_HPP
diff --git a/src/guichan/include/guichan/cliprectangle.hpp b/src/guichan/include/guichan/cliprectangle.hpp
index 5b7397639..51887c032 100644
--- a/src/guichan/include/guichan/cliprectangle.hpp
+++ b/src/guichan/include/guichan/cliprectangle.hpp
@@ -61,7 +61,6 @@ namespace gcn
class GCN_CORE_DECLSPEC ClipRectangle final : public Rectangle
{
public:
-
/**
* Constructor.
*/
@@ -107,6 +106,6 @@ namespace gcn
*/
int yOffset;
};
-}
+} // namespace gcn
-#endif // end GCN_CLIPRECTANGLE_HPP
+#endif // end GCN_CLIPRECTANGLE_HPP
diff --git a/src/guichan/include/guichan/color.hpp b/src/guichan/include/guichan/color.hpp
index 0d7ccce5e..6fb650655 100644
--- a/src/guichan/include/guichan/color.hpp
+++ b/src/guichan/include/guichan/color.hpp
@@ -59,7 +59,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Color final
{
public:
-
/**
* Constructor. Initializes the color to black.
*/
@@ -77,7 +76,7 @@ namespace gcn
*
* @param color The color to initialise the object with.
*/
- Color(const int color);
+ explicit Color(const int color);
/**
* Constructor. The default alpha value is 255.
@@ -171,6 +170,6 @@ namespace gcn
*/
int a;
};
-}
+} // namespace gcn
-#endif // end GCN_COLOR_HPP
+#endif // end GCN_COLOR_HPP
diff --git a/src/guichan/include/guichan/deathlistener.hpp b/src/guichan/include/guichan/deathlistener.hpp
index c419edd35..360032289 100644
--- a/src/guichan/include/guichan/deathlistener.hpp
+++ b/src/guichan/include/guichan/deathlistener.hpp
@@ -62,7 +62,6 @@ namespace gcn
class GCN_CORE_DECLSPEC DeathListener
{
public:
-
/**
* Destructor.
*/
@@ -76,7 +75,7 @@ namespace gcn
* @param event The event of the death.
*/
virtual void death(const Event& event) = 0;
-
+
protected:
/**
* Constructor.
@@ -87,6 +86,6 @@ namespace gcn
DeathListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_DEATHLISTENER_HPP
+#endif // end GCN_DEATHLISTENER_HPP
diff --git a/src/guichan/include/guichan/event.hpp b/src/guichan/include/guichan/event.hpp
index 5e85a3ca8..b4c5abcf7 100644
--- a/src/guichan/include/guichan/event.hpp
+++ b/src/guichan/include/guichan/event.hpp
@@ -68,7 +68,7 @@ namespace gcn
*
* @param source The source widget of the event.
*/
- Event(Widget *const source);
+ explicit Event(Widget *const source);
A_DELETE_COPY(Event)
@@ -91,6 +91,6 @@ namespace gcn
*/
Widget* mSource;
};
-}
+} // namespace gcn
-#endif // end GCN_EVENT_HPP
+#endif // end GCN_EVENT_HPP
diff --git a/src/guichan/include/guichan/exception.hpp b/src/guichan/include/guichan/exception.hpp
index 2e7b250b3..bbf8b31ce 100644
--- a/src/guichan/include/guichan/exception.hpp
+++ b/src/guichan/include/guichan/exception.hpp
@@ -88,7 +88,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Exception final
{
public:
-
/**
* Constructor.
*/
@@ -99,7 +98,7 @@ namespace gcn
*
* @param message The error message of the exception.
*/
- Exception(const std::string& message);
+ explicit Exception(const std::string& message);
/**
* Constructor.
@@ -169,9 +168,9 @@ namespace gcn
*/
unsigned int mLine;
};
-}
+} // namespace gcn
-#endif // end GCN_EXCEPTION_HPP
+#endif // end GCN_EXCEPTION_HPP
/*
* "Final Fantasy XI is the BEST!... It's even better then water!"
diff --git a/src/guichan/include/guichan/focushandler.hpp b/src/guichan/include/guichan/focushandler.hpp
index 27b6bc91f..3e1402264 100644
--- a/src/guichan/include/guichan/focushandler.hpp
+++ b/src/guichan/include/guichan/focushandler.hpp
@@ -71,7 +71,6 @@ namespace gcn
class GCN_CORE_DECLSPEC FocusHandler
{
public:
-
/**
* Constructor.
*/
@@ -83,7 +82,7 @@ namespace gcn
* Destructor.
*/
virtual ~FocusHandler()
- { };
+ { }
/**
* Requests focus for a widget. Focus will only be granted to a widget
@@ -395,6 +394,6 @@ namespace gcn
*/
Widget* mLastWidgetPressed;
};
-}
+} // namespace gcn
-#endif // end GCN_FOCUSHANDLER_HPP
+#endif // end GCN_FOCUSHANDLER_HPP
diff --git a/src/guichan/include/guichan/focuslistener.hpp b/src/guichan/include/guichan/focuslistener.hpp
index 59e8cbe12..7e95ceb4d 100644
--- a/src/guichan/include/guichan/focuslistener.hpp
+++ b/src/guichan/include/guichan/focuslistener.hpp
@@ -64,7 +64,6 @@ namespace gcn
class GCN_CORE_DECLSPEC FocusListener
{
public:
-
/**
* Destructor.
*/
@@ -77,7 +76,7 @@ namespace gcn
* @param event Discribes the event.
*/
virtual void focusGained(const Event& event A_UNUSED)
- { };
+ { }
/**
* Called when a widget loses focus.
@@ -85,7 +84,7 @@ namespace gcn
* @param event Discribes the event.
*/
virtual void focusLost(const Event& event A_UNUSED)
- { };
+ { }
protected:
/**
@@ -97,6 +96,6 @@ namespace gcn
FocusListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_FOCUSLISTENER_HPP
+#endif // end GCN_FOCUSLISTENER_HPP
diff --git a/src/guichan/include/guichan/font.hpp b/src/guichan/include/guichan/font.hpp
index b5430574e..b400b9cb6 100644
--- a/src/guichan/include/guichan/font.hpp
+++ b/src/guichan/include/guichan/font.hpp
@@ -62,7 +62,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Font
{
public:
-
/**
* Destructor.
*/
@@ -111,6 +110,6 @@ namespace gcn
virtual void drawString(Graphics* graphics, const std::string& text,
int x, int y) = 0;
};
-}
+} // namespace gcn
-#endif // end GCN_FONT_HPP
+#endif // end GCN_FONT_HPP
diff --git a/src/guichan/include/guichan/graphics.hpp b/src/guichan/include/guichan/graphics.hpp
index aadb81371..a8217d50d 100644
--- a/src/guichan/include/guichan/graphics.hpp
+++ b/src/guichan/include/guichan/graphics.hpp
@@ -271,6 +271,6 @@ namespace gcn
*/
Font* mFont;
};
-}
+} // namespace gcn
-#endif // end GCN_GRAPHICS_HPP
+#endif // end GCN_GRAPHICS_HPP
diff --git a/src/guichan/include/guichan/gui.hpp b/src/guichan/include/guichan/gui.hpp
index 543681598..ea952ec9c 100644
--- a/src/guichan/include/guichan/gui.hpp
+++ b/src/guichan/include/guichan/gui.hpp
@@ -97,7 +97,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Gui
{
public:
-
/**
* Constructor.
*/
@@ -501,9 +500,9 @@ namespace gcn
*/
std::deque<Widget*> mWidgetWithMouseQueue;
};
-}
+} // namespace gcn
-#endif // end GCN_GUI_HPP
+#endif // end GCN_GUI_HPP
/* yakslem - "Women, it's a constant struggle."
* finalman - "Yes, but sometimes they succeed with their guesses."
diff --git a/src/guichan/include/guichan/image.hpp b/src/guichan/include/guichan/image.hpp
index 0feb74e78..2baa06fb2 100644
--- a/src/guichan/include/guichan/image.hpp
+++ b/src/guichan/include/guichan/image.hpp
@@ -72,7 +72,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Image
{
public:
-
/**
* Constructor.
*/
@@ -141,6 +140,6 @@ namespace gcn
*/
virtual void convertToDisplayFormat() = 0;
};
-}
+} // namespace gcn
-#endif // end GCN_IMAGE_HPP
+#endif // end GCN_IMAGE_HPP
diff --git a/src/guichan/include/guichan/input.hpp b/src/guichan/include/guichan/input.hpp
index 829ab18fb..2a22ce965 100644
--- a/src/guichan/include/guichan/input.hpp
+++ b/src/guichan/include/guichan/input.hpp
@@ -69,7 +69,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Input
{
public:
-
/**
* Destructor.
*/
@@ -113,6 +112,6 @@ namespace gcn
*/
virtual void _pollInput() = 0;
};
-}
+} // namespace gcn
-#endif // end GCN_INPUT_HPP
+#endif // end GCN_INPUT_HPP
diff --git a/src/guichan/include/guichan/inputevent.hpp b/src/guichan/include/guichan/inputevent.hpp
index 4b323f6d5..670b7099b 100644
--- a/src/guichan/include/guichan/inputevent.hpp
+++ b/src/guichan/include/guichan/inputevent.hpp
@@ -59,7 +59,6 @@ namespace gcn
class GCN_CORE_DECLSPEC InputEvent: public Event
{
public:
-
/**
* Constructor.
*
@@ -155,6 +154,6 @@ namespace gcn
*/
bool mIsConsumed;
};
-}
+} // namespace gcn
-#endif // end GCN_INPUTEVENT_HPP
+#endif // end GCN_INPUTEVENT_HPP
diff --git a/src/guichan/include/guichan/key.hpp b/src/guichan/include/guichan/key.hpp
index 6acce412c..8a2a9a13d 100644
--- a/src/guichan/include/guichan/key.hpp
+++ b/src/guichan/include/guichan/key.hpp
@@ -64,13 +64,12 @@ namespace gcn
class GCN_CORE_DECLSPEC Key final
{
public:
-
/**
* Constructor.
*
* @param value The ascii or enum value for the key.
*/
- Key(const int value = 0);
+ explicit Key(const int value = 0);
/**
* Checks if a key is a character.
@@ -180,6 +179,6 @@ namespace gcn
*/
int mValue;
};
-}
+} // namespace gcn
-#endif // end GCN_KEY_HPP
+#endif // end GCN_KEY_HPP
diff --git a/src/guichan/include/guichan/keyevent.hpp b/src/guichan/include/guichan/keyevent.hpp
index 99b632af1..61848192d 100644
--- a/src/guichan/include/guichan/keyevent.hpp
+++ b/src/guichan/include/guichan/keyevent.hpp
@@ -134,6 +134,6 @@ namespace gcn
*/
Key mKey;
};
-}
+} // namespace gcn
-#endif // end GCN_KEYEVENT_HPP
+#endif // end GCN_KEYEVENT_HPP
diff --git a/src/guichan/include/guichan/keyinput.hpp b/src/guichan/include/guichan/keyinput.hpp
index c19fbea22..6b1d8e932 100644
--- a/src/guichan/include/guichan/keyinput.hpp
+++ b/src/guichan/include/guichan/keyinput.hpp
@@ -60,7 +60,6 @@ namespace gcn
class GCN_CORE_DECLSPEC KeyInput
{
public:
-
/**
* Constructor.
*/
@@ -71,7 +70,7 @@ namespace gcn
mAltPressed(false),
mMetaPressed(false),
mNumericPad(false)
- { };
+ { }
/**
* Constructor.
@@ -266,6 +265,6 @@ namespace gcn
*/
bool mNumericPad;
};
-}
+} // namespace gcn
-#endif // end GCN_KEYINPUT_HPP
+#endif // end GCN_KEYINPUT_HPP
diff --git a/src/guichan/include/guichan/keylistener.hpp b/src/guichan/include/guichan/keylistener.hpp
index 7336f8623..427a8adbb 100644
--- a/src/guichan/include/guichan/keylistener.hpp
+++ b/src/guichan/include/guichan/keylistener.hpp
@@ -62,7 +62,6 @@ namespace gcn
class GCN_CORE_DECLSPEC KeyListener
{
public:
-
/**
* Destructor.
*/
@@ -97,6 +96,6 @@ namespace gcn
KeyListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_KEYLISTENER_HPP
+#endif // end GCN_KEYLISTENER_HPP
diff --git a/src/guichan/include/guichan/listmodel.hpp b/src/guichan/include/guichan/listmodel.hpp
index 681a9e0c8..640c3fcc5 100644
--- a/src/guichan/include/guichan/listmodel.hpp
+++ b/src/guichan/include/guichan/listmodel.hpp
@@ -62,7 +62,6 @@ namespace gcn
*/
class GCN_CORE_DECLSPEC ListModel
{
-
public:
/**
* Destructor.
@@ -85,6 +84,6 @@ namespace gcn
*/
virtual std::string getElementAt(int i) A_WARN_UNUSED = 0;
};
-}
+} // namespace gcn
-#endif // end GCN_LISTMODEL_HPP
+#endif // end GCN_LISTMODEL_HPP
diff --git a/src/guichan/include/guichan/mouseevent.hpp b/src/guichan/include/guichan/mouseevent.hpp
index 876eaa9ef..ca39e388c 100644
--- a/src/guichan/include/guichan/mouseevent.hpp
+++ b/src/guichan/include/guichan/mouseevent.hpp
@@ -62,7 +62,6 @@ namespace gcn
class GCN_CORE_DECLSPEC MouseEvent: public InputEvent
{
public:
-
/**
* Constructor.
*
@@ -145,7 +144,6 @@ namespace gcn
ENTERED,
EXITED,
DRAGGED
-
};
/**
@@ -196,6 +194,6 @@ namespace gcn
*/
friend class Gui;
};
-}
+} // namespace gcn
-#endif // GCN_MOUSEEVENT_HPP
+#endif // GCN_MOUSEEVENT_HPP
diff --git a/src/guichan/include/guichan/mouseinput.hpp b/src/guichan/include/guichan/mouseinput.hpp
index 435774573..287e905ec 100644
--- a/src/guichan/include/guichan/mouseinput.hpp
+++ b/src/guichan/include/guichan/mouseinput.hpp
@@ -64,7 +64,6 @@ namespace gcn
class GCN_CORE_DECLSPEC MouseInput
{
public:
-
/**
* Constructor.
*/
@@ -74,7 +73,7 @@ namespace gcn
mTimeStamp(0),
mX(0),
mY(0)
- { };
+ { }
/**
* Constructor.
@@ -239,6 +238,6 @@ namespace gcn
*/
int mY;
};
-}
+} // namespace gcn
-#endif // end GCN_MOUSEINPUT_HPP
+#endif // end GCN_MOUSEINPUT_HPP
diff --git a/src/guichan/include/guichan/mouselistener.hpp b/src/guichan/include/guichan/mouselistener.hpp
index 6258a64fb..2ed75e5ba 100644
--- a/src/guichan/include/guichan/mouselistener.hpp
+++ b/src/guichan/include/guichan/mouselistener.hpp
@@ -61,7 +61,6 @@ namespace gcn
class GCN_CORE_DECLSPEC MouseListener
{
public:
-
/**
* Destructor.
*/
@@ -76,7 +75,6 @@ namespace gcn
*/
virtual void mouseEntered(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -87,7 +85,6 @@ namespace gcn
*/
virtual void mouseExited(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -101,7 +98,6 @@ namespace gcn
*/
virtual void mousePressed(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -112,7 +108,6 @@ namespace gcn
*/
virtual void mouseReleased(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -124,7 +119,6 @@ namespace gcn
*/
virtual void mouseClicked(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -135,7 +129,6 @@ namespace gcn
*/
virtual void mouseWheelMovedUp(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -146,7 +139,6 @@ namespace gcn
*/
virtual void mouseWheelMovedDown(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -158,7 +150,6 @@ namespace gcn
*/
virtual void mouseMoved(MouseEvent& mouseEvent A_UNUSED)
{
-
}
/**
@@ -170,7 +161,6 @@ namespace gcn
*/
virtual void mouseDragged(MouseEvent& mouseEvent A_UNUSED)
{
-
}
protected:
@@ -183,6 +173,6 @@ namespace gcn
MouseListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_MOUSELISTENER_HPP
+#endif // end GCN_MOUSELISTENER_HPP
diff --git a/src/guichan/include/guichan/platform.hpp b/src/guichan/include/guichan/platform.hpp
index c2ede557c..e27d87def 100644
--- a/src/guichan/include/guichan/platform.hpp
+++ b/src/guichan/include/guichan/platform.hpp
@@ -73,4 +73,4 @@
#define GCN_EXTENSION_DECLSPEC
#endif
-#endif // end GCN_PLATFORM_HPP
+#endif // end GCN_PLATFORM_HPP
diff --git a/src/guichan/include/guichan/rectangle.hpp b/src/guichan/include/guichan/rectangle.hpp
index 7580fea8c..5df69fec5 100644
--- a/src/guichan/include/guichan/rectangle.hpp
+++ b/src/guichan/include/guichan/rectangle.hpp
@@ -61,7 +61,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Rectangle
{
public:
-
/**
* Constructor. The default rectangle is an empty rectangle
* at the coordinates (0,0).
@@ -138,6 +137,6 @@ namespace gcn
*/
int height;
};
-}
+} // namespace gcn
-#endif // end GCN_RECTANGEL_HPP
+#endif // end GCN_RECTANGEL_HPP
diff --git a/src/guichan/include/guichan/sdl/sdlgraphics.hpp b/src/guichan/include/guichan/sdl/sdlgraphics.hpp
index 8b565c400..fff1f6e29 100644
--- a/src/guichan/include/guichan/sdl/sdlgraphics.hpp
+++ b/src/guichan/include/guichan/sdl/sdlgraphics.hpp
@@ -62,7 +62,6 @@ namespace gcn
class GCN_EXTENSION_DECLSPEC SDLGraphics : public Graphics
{
public:
-
// Needed so that drawImage(gcn::Image *, int, int) is visible.
using Graphics::drawImage;
@@ -154,6 +153,6 @@ namespace gcn
Color mColor;
bool mAlpha;
};
-}
+} // namespace gcn
-#endif // end GCN_SDLGRAPHICS_HPP
+#endif // end GCN_SDLGRAPHICS_HPP
diff --git a/src/guichan/include/guichan/sdl/sdlpixel.hpp b/src/guichan/include/guichan/sdl/sdlpixel.hpp
index daf11acc5..c068aa290 100644
--- a/src/guichan/include/guichan/sdl/sdlpixel.hpp
+++ b/src/guichan/include/guichan/sdl/sdlpixel.hpp
@@ -237,8 +237,10 @@ namespace gcn
Uint8 *p = static_cast<uint8_t*>(surface->pixels)
+ y * surface->pitch + x * bpp;
- Uint32 pixel = SDL_MapRGB(surface->format, static_cast<uint8_t>(color.r),
- static_cast<uint8_t>(color.g), static_cast<uint8_t>(color.b));
+ Uint32 pixel = SDL_MapRGB(surface->format,
+ static_cast<uint8_t>(color.r),
+ static_cast<uint8_t>(color.g),
+ static_cast<uint8_t>(color.b));
switch (bpp)
{
@@ -285,6 +287,6 @@ namespace gcn
SDL_UnlockSurface(surface);
}
-}
+} // namespace gcn
-#endif // end GCN_SDLPIXEL_HPP
+#endif // end GCN_SDLPIXEL_HPP
diff --git a/src/guichan/include/guichan/selectionevent.hpp b/src/guichan/include/guichan/selectionevent.hpp
index 0d002a524..553091bc8 100644
--- a/src/guichan/include/guichan/selectionevent.hpp
+++ b/src/guichan/include/guichan/selectionevent.hpp
@@ -63,19 +63,18 @@ namespace gcn
class GCN_CORE_DECLSPEC SelectionEvent final: public Event
{
public:
-
/**
* Constructor.
*
* @param source source The widget of the selection event.
*/
- SelectionEvent(Widget *const source);
+ explicit SelectionEvent(Widget *const source);
/**
* Destructor.
*/
virtual ~SelectionEvent();
};
-}
+} // namespace gcn
-#endif // end GCN_SELECTIONEVENT_HPP
+#endif // end GCN_SELECTIONEVENT_HPP
diff --git a/src/guichan/include/guichan/selectionlistener.hpp b/src/guichan/include/guichan/selectionlistener.hpp
index 09039e5e0..173fbf9af 100644
--- a/src/guichan/include/guichan/selectionlistener.hpp
+++ b/src/guichan/include/guichan/selectionlistener.hpp
@@ -67,7 +67,6 @@ namespace gcn
class GCN_CORE_DECLSPEC SelectionListener
{
public:
-
/**
* Destructor.
*/
@@ -83,7 +82,7 @@ namespace gcn
* @since 0.8.0
*/
virtual void valueChanged(const SelectionEvent& event A_UNUSED)
- { };
+ { }
protected:
/**
@@ -95,6 +94,6 @@ namespace gcn
SelectionListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_SELECTIONLISTENER_HPP
+#endif // end GCN_SELECTIONLISTENER_HPP
diff --git a/src/guichan/include/guichan/widget.hpp b/src/guichan/include/guichan/widget.hpp
index d4e1158b3..8a49a9e3b 100644
--- a/src/guichan/include/guichan/widget.hpp
+++ b/src/guichan/include/guichan/widget.hpp
@@ -904,7 +904,7 @@ namespace gcn
* @since 0.1.0
*/
virtual void moveToTop(Widget* widget A_UNUSED)
- { };
+ { }
/**
* Moves a widget in this widget to the bottom of this widget.
@@ -915,7 +915,7 @@ namespace gcn
* @since 0.1.0
*/
virtual void moveToBottom(Widget* widget A_UNUSED)
- { };
+ { }
/**
* Focuses the next widget in the widget.
@@ -924,7 +924,7 @@ namespace gcn
* @since 0.1.0
*/
virtual void focusNext()
- { };
+ { }
/**
* Focuses the previous widget in the widget.
@@ -933,7 +933,7 @@ namespace gcn
* @since 0.1.0
*/
virtual void focusPrevious()
- { };
+ { }
/**
* Tries to show a specific part of a widget by moving it. Used if the
@@ -945,7 +945,7 @@ namespace gcn
*/
virtual void showWidgetPart(Widget* widget A_UNUSED,
Rectangle area A_UNUSED)
- { };
+ { }
/**
* Sets an id of a widget. An id can be useful if a widget needs to be
@@ -1208,6 +1208,6 @@ namespace gcn
static std::set<Widget*> mWidgetsSet;
};
-}
+} // namespace gcn
-#endif // end GCN_WIDGET_HPP
+#endif // end GCN_WIDGET_HPP
diff --git a/src/guichan/include/guichan/widgetlistener.hpp b/src/guichan/include/guichan/widgetlistener.hpp
index 71ea4d4e9..ab8a2b791 100644
--- a/src/guichan/include/guichan/widgetlistener.hpp
+++ b/src/guichan/include/guichan/widgetlistener.hpp
@@ -66,7 +66,6 @@ namespace gcn
class GCN_CORE_DECLSPEC WidgetListener
{
public:
-
/**
* Destructor.
*/
@@ -121,6 +120,6 @@ namespace gcn
WidgetListener()
{ }
};
-}
+} // namespace gcn
-#endif // end GCN_WIDGETLISTENER_HPP
+#endif // end GCN_WIDGETLISTENER_HPP
diff --git a/src/guichan/include/guichan/widgets/button.hpp b/src/guichan/include/guichan/widgets/button.hpp
index 052250e42..b34e5f921 100644
--- a/src/guichan/include/guichan/widgets/button.hpp
+++ b/src/guichan/include/guichan/widgets/button.hpp
@@ -83,7 +83,7 @@ namespace gcn
*
* @param caption The caption of the button.
*/
- Button(const std::string& caption);
+ explicit Button(const std::string& caption);
A_DELETE_COPY(Button)
@@ -197,6 +197,6 @@ namespace gcn
*/
unsigned int mSpacing;
};
-}
+} // namespace gcn
-#endif // end GCN_BUTTON_HPP
+#endif // end GCN_BUTTON_HPP
diff --git a/src/guichan/include/guichan/widgets/checkbox.hpp b/src/guichan/include/guichan/widgets/checkbox.hpp
index 481f28dba..8fee9ba19 100644
--- a/src/guichan/include/guichan/widgets/checkbox.hpp
+++ b/src/guichan/include/guichan/widgets/checkbox.hpp
@@ -68,7 +68,6 @@ namespace gcn
public KeyListener
{
public:
-
/**
* Contructor.
*/
@@ -158,6 +157,6 @@ namespace gcn
*/
std::string mCaption;
};
-}
+} // namespace gcn
-#endif // end GCN_CHECKBOX_HPP
+#endif // end GCN_CHECKBOX_HPP
diff --git a/src/guichan/include/guichan/widgets/container.hpp b/src/guichan/include/guichan/widgets/container.hpp
index 393a9a960..2fe1cf169 100644
--- a/src/guichan/include/guichan/widgets/container.hpp
+++ b/src/guichan/include/guichan/widgets/container.hpp
@@ -64,7 +64,6 @@ namespace gcn
class GCN_CORE_DECLSPEC Container: public BasicContainer
{
public:
-
/**
* Constructor. A container is opauqe as default, if you want a
* none opaque container call setQpaque(false).
@@ -158,6 +157,6 @@ namespace gcn
*/
bool mOpaque;
};
-}
+} // namespace gcn
-#endif // end GCN_CONTAINER_HPP
+#endif // end GCN_CONTAINER_HPP
diff --git a/src/guichan/include/guichan/widgets/label.hpp b/src/guichan/include/guichan/widgets/label.hpp
index a6000b47c..a99912de3 100644
--- a/src/guichan/include/guichan/widgets/label.hpp
+++ b/src/guichan/include/guichan/widgets/label.hpp
@@ -70,7 +70,7 @@ namespace gcn
*
* @param caption The caption of the label.
*/
- Label(const std::string& caption);
+ explicit Label(const std::string& caption);
A_DELETE_COPY(Label)
@@ -131,6 +131,6 @@ namespace gcn
*/
Graphics::Alignment mAlignment;
};
-}
+} // namespace gcn
-#endif // end GCN_LABEL_HPP
+#endif // end GCN_LABEL_HPP
diff --git a/src/guichan/include/guichan/widgets/listbox.hpp b/src/guichan/include/guichan/widgets/listbox.hpp
index 8438bd5ed..05eb0d78e 100644
--- a/src/guichan/include/guichan/widgets/listbox.hpp
+++ b/src/guichan/include/guichan/widgets/listbox.hpp
@@ -84,7 +84,7 @@ namespace gcn
*
* @param listModel the list model to use.
*/
- ListBox(ListModel *listModel);
+ explicit ListBox(ListModel *listModel);
A_DELETE_COPY(ListBox)
@@ -252,6 +252,6 @@ namespace gcn
*/
typedef SelectionListenerList::iterator SelectionListenerIterator;
};
-}
+} // namespace gcn
-#endif // end GCN_LISTBOX_HPP
+#endif // end GCN_LISTBOX_HPP
diff --git a/src/guichan/include/guichan/widgets/radiobutton.hpp b/src/guichan/include/guichan/widgets/radiobutton.hpp
index 0de04e078..ba81c1f8e 100644
--- a/src/guichan/include/guichan/widgets/radiobutton.hpp
+++ b/src/guichan/include/guichan/widgets/radiobutton.hpp
@@ -71,7 +71,6 @@ namespace gcn
public KeyListener
{
public:
-
/**
* Constructor.
*/
@@ -204,6 +203,6 @@ namespace gcn
*/
static GroupMap mGroupMap;
};
-}
+} // namespace gcn
-#endif // end GCN_RADIOBUTTON_HPP
+#endif // end GCN_RADIOBUTTON_HPP
diff --git a/src/guichan/include/guichan/widgets/scrollarea.hpp b/src/guichan/include/guichan/widgets/scrollarea.hpp
index 32a3f8f5b..50549e370 100644
--- a/src/guichan/include/guichan/widgets/scrollarea.hpp
+++ b/src/guichan/include/guichan/widgets/scrollarea.hpp
@@ -63,7 +63,6 @@ namespace gcn
public MouseListener
{
public:
-
/**
* Scrollpolicies for the horizontal and vertical scrollbar.
* The policies are:
@@ -90,7 +89,7 @@ namespace gcn
*
* @param content The content of the scroll area.
*/
- ScrollArea(Widget *const content);
+ explicit ScrollArea(Widget *const content);
/**
* Constructor.
@@ -101,8 +100,8 @@ namespace gcn
* @param vPolicy The policy for the vertical scrollbar. See enum with
* policies.
*/
- ScrollArea(Widget *content,
- ScrollPolicy hPolicy,
+ ScrollArea(Widget *content,
+ ScrollPolicy hPolicy,
ScrollPolicy vPolicy);
A_DELETE_COPY(ScrollArea)
@@ -325,8 +324,7 @@ namespace gcn
* @return True if the scroll area is opaque, false otherwise.
*/
bool isOpaque() const;
-
-
+
// Inherited from BasicContainer
virtual void showWidgetPart(Widget* widget, Rectangle area);
@@ -528,6 +526,6 @@ namespace gcn
*/
bool mOpaque;
};
-}
+} // namespace gcn
-#endif // end GCN_SCROLLAREA_HPP
+#endif // end GCN_SCROLLAREA_HPP
diff --git a/src/guichan/include/guichan/widgets/slider.hpp b/src/guichan/include/guichan/widgets/slider.hpp
index 43e301229..c4229a514 100644
--- a/src/guichan/include/guichan/widgets/slider.hpp
+++ b/src/guichan/include/guichan/widgets/slider.hpp
@@ -65,7 +65,6 @@ namespace gcn
public KeyListener
{
public:
-
/**
* Draw orientations for the slider. A slider can be drawn vertically or
* horizontally.
@@ -81,7 +80,7 @@ namespace gcn
*
* @param scaleEnd The end value of the slider scale.
*/
- Slider(const double scaleEnd = 1.0);
+ explicit Slider(const double scaleEnd = 1.0);
/**
* Constructor.
@@ -224,7 +223,6 @@ namespace gcn
virtual void keyPressed(KeyEvent& keyEvent) override;
protected:
-
/**
* Converts a marker position to a value in the scale.
*
@@ -287,6 +285,6 @@ namespace gcn
*/
Orientation mOrientation;
};
-}
+} // namespace gcn
-#endif // end GCN_SLIDER_HPP
+#endif // end GCN_SLIDER_HPP
diff --git a/src/guichan/include/guichan/widgets/textbox.hpp b/src/guichan/include/guichan/widgets/textbox.hpp
index ba26966cc..8900936ab 100644
--- a/src/guichan/include/guichan/widgets/textbox.hpp
+++ b/src/guichan/include/guichan/widgets/textbox.hpp
@@ -75,7 +75,7 @@ namespace gcn
*
* @param text The default text of the text box.
*/
- TextBox(const std::string& text);
+ explicit TextBox(const std::string& text);
A_DELETE_COPY(TextBox)
@@ -287,6 +287,6 @@ namespace gcn
*/
bool mOpaque;
};
-}
+} // namespace gcn
-#endif // end GCN_TEXTBOX_HPP
+#endif // end GCN_TEXTBOX_HPP
diff --git a/src/guichan/include/guichan/widgets/textfield.hpp b/src/guichan/include/guichan/widgets/textfield.hpp
index 27c4aee26..6b048a03b 100644
--- a/src/guichan/include/guichan/widgets/textfield.hpp
+++ b/src/guichan/include/guichan/widgets/textfield.hpp
@@ -74,7 +74,7 @@ namespace gcn
*
* @param text The default text of the text field.
*/
- TextField(const std::string& text);
+ explicit TextField(const std::string& text);
A_DELETE_COPY(TextField)
@@ -167,6 +167,6 @@ namespace gcn
*/
int mXScroll;
};
-}
+} // namespace gcn
-#endif // end GCN_TEXTFIELD_HPP
+#endif // end GCN_TEXTFIELD_HPP
diff --git a/src/guichan/include/guichan/widgets/window.hpp b/src/guichan/include/guichan/widgets/window.hpp
index 442e3da1b..436664e24 100644
--- a/src/guichan/include/guichan/widgets/window.hpp
+++ b/src/guichan/include/guichan/widgets/window.hpp
@@ -71,7 +71,7 @@ namespace gcn
*
* @param caption the caption of the window.
*/
- Window(const std::string& caption);
+ explicit Window(const std::string& caption);
A_DELETE_COPY(Window)
@@ -246,6 +246,6 @@ namespace gcn
*/
bool mMoved;
};
-}
+} // namespace gcn
-#endif // end GCN_WINDOW_HPP
+#endif // end GCN_WINDOW_HPP
diff --git a/src/guichan/mouseinput.cpp b/src/guichan/mouseinput.cpp
index b0b36e410..929e2886b 100644
--- a/src/guichan/mouseinput.cpp
+++ b/src/guichan/mouseinput.cpp
@@ -114,4 +114,4 @@ namespace gcn
{
return mY;
}
-}
+} // namespace gcn
diff --git a/src/guichan/sdl/sdlgraphics.cpp b/src/guichan/sdl/sdlgraphics.cpp
index 9678f7a60..a44acf458 100644
--- a/src/guichan/sdl/sdlgraphics.cpp
+++ b/src/guichan/sdl/sdlgraphics.cpp
@@ -63,7 +63,6 @@
namespace gcn
{
-
SDLGraphics::SDLGraphics() :
Graphics(),
mTarget(nullptr),
diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp
index dcd64371e..d1150dbf0 100644
--- a/src/guichan/widget.cpp
+++ b/src/guichan/widget.cpp
@@ -110,8 +110,8 @@ namespace gcn
{
BLOCK_START("Widget::drawFrame")
const Color &faceColor = getBaseColor();
- Color highlightColor = faceColor + 0x303030;
- Color shadowColor = faceColor - 0x303030;
+ Color highlightColor = faceColor + Color(0x303030);
+ Color shadowColor = faceColor - Color(0x303030);
const int alpha = getBaseColor().a;
const int width = getWidth() + getFrameSize() * 2 - 1;
const int height = getHeight() + getFrameSize() * 2 - 1;
diff --git a/src/guild.h b/src/guild.h
index 0a4a82397..d0dd91650 100644
--- a/src/guild.h
+++ b/src/guild.h
@@ -214,4 +214,4 @@ private:
bool mServerGuild;
};
-#endif // GUILD_H
+#endif // GUILD_H
diff --git a/src/guildmanager.h b/src/guildmanager.h
index 1a7098058..2ceee2c71 100644
--- a/src/guildmanager.h
+++ b/src/guildmanager.h
@@ -102,4 +102,4 @@ class GuildManager final
extern GuildManager *guildManager;
-#endif // GUILDMANAGER_H
+#endif // GUILDMANAGER_H
diff --git a/src/imagesprite.h b/src/imagesprite.h
index 294d0264c..c71223cda 100644
--- a/src/imagesprite.h
+++ b/src/imagesprite.h
@@ -31,7 +31,7 @@ class Graphics;
class ImageSprite final : public Sprite
{
public:
- ImageSprite(Image *const image);
+ explicit ImageSprite(Image *const image);
A_DELETE_COPY(ImageSprite)
@@ -78,4 +78,4 @@ private:
Image *mImage;
};
-#endif // IMAGESPRITE_H
+#endif // IMAGESPRITE_H
diff --git a/src/inputmanager.h b/src/inputmanager.h
index da3095c81..ff07f6c85 100644
--- a/src/inputmanager.h
+++ b/src/inputmanager.h
@@ -73,19 +73,19 @@ struct KeyFunction final
enum KeyCondition
{
- COND_DEFAULT = 1, // default condition
- COND_ENABLED = 2, // keyboard must be enabled
- COND_NOINPUT = 4, // input items must be unfocused
- COND_NOAWAY = 8, // player not in away mode
- COND_NOSETUP = 16, // setup window is hidde
- COND_VALIDSPEED = 32, // valid speed
- COND_NOMODAL = 64, // modal windows inactive
- COND_NONPCINPUT = 128, // npc input field inactive
- COND_EMODS = 256, // game modifiers enabled
- COND_NOTARGET = 512, // no target/untarget keys pressed
- COND_NOFOLLOW = 1024, // follow mode disabled
- COND_SHORTCUT = 2 + 4 + 16 + 512, // flags for shortcut keys
- COND_GAME = 2 + 4 + 8 + 16 + 64, // main game key
+ COND_DEFAULT = 1, // default condition
+ COND_ENABLED = 2, // keyboard must be enabled
+ COND_NOINPUT = 4, // input items must be unfocused
+ COND_NOAWAY = 8, // player not in away mode
+ COND_NOSETUP = 16, // setup window is hidde
+ COND_VALIDSPEED = 32, // valid speed
+ COND_NOMODAL = 64, // modal windows inactive
+ COND_NONPCINPUT = 128, // npc input field inactive
+ COND_EMODS = 256, // game modifiers enabled
+ COND_NOTARGET = 512, // no target/untarget keys pressed
+ COND_NOFOLLOW = 1024, // follow mode disabled
+ COND_SHORTCUT = 2 + 4 + 16 + 512, // flags for shortcut keys
+ COND_GAME = 2 + 4 + 8 + 16 + 64, // main game key
COND_GAME2 = 2 + 8 + 16 + 64
};
diff --git a/src/itemshortcut.h b/src/itemshortcut.h
index f66895b6a..f8eda6215 100644
--- a/src/itemshortcut.h
+++ b/src/itemshortcut.h
@@ -144,7 +144,6 @@ class ItemShortcut final
void unequipItem(const int index) const;
private:
-
int mItems[SHORTCUT_ITEMS]; /**< The items. */
unsigned char mItemColors[SHORTCUT_ITEMS]; /**< The item colors. */
int mItemSelected;
diff --git a/src/joystick.h b/src/joystick.h
index 128a41a35..b014f380c 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -172,4 +172,4 @@ class Joystick final
extern Joystick *joystick;
-#endif // JOYSTICK_H
+#endif // JOYSTICK_H
diff --git a/src/keydata.h b/src/keydata.h
index 9315dffca..8e06c5eb7 100644
--- a/src/keydata.h
+++ b/src/keydata.h
@@ -342,6 +342,6 @@ namespace Input
KEY_SHOW_WINDOWS,
KEY_TOTAL
};
-}
+} // namespace Input
#endif
diff --git a/src/localconsts.h b/src/localconsts.h
index d6c535640..2253fbf1f 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -34,8 +34,8 @@
#define final
#define override
#define constexpr
-//#define A_DELETE
-//#define A_DELETE_COPY
+// #define A_DELETE
+// #define A_DELETE_COPY
#endif
#undef Z_NULL
#define Z_NULL nullptr
@@ -63,19 +63,19 @@
#define FOR_EACHP(type, iter, array) for (type iter = array->begin(), \
iter##_end = array->end(); iter != iter##_end; ++ iter)
-//#define DEBUG_CONFIG 1
-//#define DEBUG_BIND_TEXTURE 1
-//#define DISABLE_RESOURCE_CACHING 1
+// #define DEBUG_CONFIG 1
+// #define DEBUG_BIND_TEXTURE 1
+// #define DISABLE_RESOURCE_CACHING 1
#define DUMP_LEAKED_RESOURCES 1
-//#define DEBUG_DUMP_LEAKS1 1
+// #define DEBUG_DUMP_LEAKS1 1
-//Android logging
-//#define ANDROID_LOG 1
+// Android logging
+// #define ANDROID_LOG 1
-//profiler
-//#define USE_PROFILER 1
+// profiler
+// #define USE_PROFILER 1
-//draw calls
-//#define DEBUG_DRAW_CALLS 1
+// draw calls
+// #define DEBUG_DRAW_CALLS 1
#include "utils/perfomance.h"
diff --git a/src/localplayer.h b/src/localplayer.h
index 5aefca302..96bd1146a 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -541,27 +541,27 @@ class LocalPlayer final : public Being,
int mTargetTime; /** How long the being has been targeted **/
int mGMLevel;
- //move type
+ // move type
unsigned int mInvertDirection;
- //crazy move type
+ // crazy move type
unsigned int mCrazyMoveType;
- //crazy move state
+ // crazy move state
unsigned int mCrazyMoveState;
- //attack weapon type
+ // attack weapon type
unsigned int mAttackWeaponType;
- //quick drop counter
+ // quick drop counter
unsigned int mQuickDropCounter;
- //move state. used if mInvertDirection == 2
+ // move state. used if mInvertDirection == 2
unsigned int mMoveState;
- //temporary disable crazy moves in moves
+ // temporary disable crazy moves in moves
bool mDisableCrazyMove;
- //pick up type 1x1, normal aka 2x1, forward aka 2x3, 3x3, 3x3 + 1
+ // pick up type 1x1, normal aka 2x1, forward aka 2x3, 3x3, 3x3 + 1
unsigned int mPickUpType;
- //magic attack type
+ // magic attack type
unsigned int mMagicAttackType;
- //pvp attack type
+ // pvp attack type
unsigned int mPvpAttackType;
- //type how move to target
+ // type how move to target
unsigned int mMoveToTargetType;
unsigned int mAttackType;
unsigned int mFollowMode;
@@ -585,16 +585,15 @@ class LocalPlayer final : public Being,
FloorItem *mPickUpTarget;
bool mGoingToTarget;
- bool mKeepAttacking; /** Whether or not to continue to attack */
- int mLastAction; /**< Time stamp of the last action, -1 if none.*/
- unsigned char mWalkingDir; /**< The direction the player is
- walking in. */
- bool mPathSetByMouse; /**< Tells if the path was set using mouse */
+ bool mKeepAttacking; // Whether or not to continue to attack
+ int mLastAction; // Time stamp of the last action, -1 if none.
+ unsigned char mWalkingDir; // The direction the player is walking in.
+ bool mPathSetByMouse; // Tells if the path was set using mouse
std::vector<int> mStatusEffectIcons;
- int mLocalWalkTime; /**< Timestamp used to control keyboard walk
- messages flooding */
+ int mLocalWalkTime; // Timestamp used to control keyboard walk
+ // messages flooding
typedef std::pair<std::string, int> MessagePair;
/** Queued messages*/
diff --git a/src/main.h b/src/main.h
index e12efce2d..df7e59fec 100644
--- a/src/main.h
+++ b/src/main.h
@@ -82,12 +82,12 @@
#define ENABLEDEBUGLOG 1
-//define DEBUG_LEAKS 1
-//define DEBUG_CONFIG 1
-//define DEBUG_FONT 1
-//define DEBUG_FONT_COUNTERS 1
-//define DEBUG_ALPHA_CACHE 1
-//define DEBUG_OPENGL_LEAKS 1
+// define DEBUG_LEAKS 1
+// define DEBUG_CONFIG 1
+// define DEBUG_FONT 1
+// define DEBUG_FONT_COUNTERS 1
+// define DEBUG_ALPHA_CACHE 1
+// define DEBUG_OPENGL_LEAKS 1
#define PACKAGE_EXTENDED_VERSION "ManaPlus (" PACKAGE_OS \
"; %s; 4144 v" SMALL_VERSION ")"
diff --git a/src/map.cpp b/src/map.cpp
index 314b21a2c..ccda5e5d7 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -954,7 +954,7 @@ Path Map::findPath(const int startX, const int startY,
const MetaTile *const t2 = &mMetaTiles[curr.x +
dx + curWidth];
- // +++ here need check block must depend
+ // +++ here need check block must depend
// on player abilities.
if (((t1->blockmask | t2->blockmask) & BLOCKMASK_WALL))
continue;
diff --git a/src/map.h b/src/map.h
index 4bfdb56fb..07354623d 100644
--- a/src/map.h
+++ b/src/map.h
@@ -136,13 +136,13 @@ class Map final : public Properties, public ConfigListener
enum BlockMask
{
- BLOCKMASK_WALL = 0x80, // 1000 0000
- BLOCKMASK_CHARACTER = 0x01, // 0000 0001
- BLOCKMASK_MONSTER = 0x02, // 0000 0010
- BLOCKMASK_AIR = 0x04, // 0000 0100
- BLOCKMASK_WATER = 0x08, // 0000 1000
- BLOCKMASK_GROUND = 0x10, // 0001 0000
- BLOCKMASK_GROUNDTOP = 0x20 // 0010 0000
+ BLOCKMASK_WALL = 0x80, // 1000 0000
+ BLOCKMASK_CHARACTER = 0x01, // 0000 0001
+ BLOCKMASK_MONSTER = 0x02, // 0000 0010
+ BLOCKMASK_AIR = 0x04, // 0000 0100
+ BLOCKMASK_WATER = 0x08, // 0000 1000
+ BLOCKMASK_GROUND = 0x10, // 0001 0000
+ BLOCKMASK_GROUNDTOP = 0x20 // 0010 0000
};
enum DebugType
@@ -429,7 +429,6 @@ class Map final : public Properties, public ConfigListener
void removeActor(const Actors::iterator &iterator);
private:
-
enum LayerType
{
FOREGROUND_LAYERS = 0,
diff --git a/src/mobileopenglgraphics.h b/src/mobileopenglgraphics.h
index 0bb57f28e..f48e625f4 100644
--- a/src/mobileopenglgraphics.h
+++ b/src/mobileopenglgraphics.h
@@ -223,6 +223,4 @@ class MobileOpenGLGraphics final : public Graphics
};
#endif
-//extern unsigned int vertexBufSize;
-
#endif
diff --git a/src/mumblemanager.cpp b/src/mumblemanager.cpp
index 44e227e15..766622453 100644
--- a/src/mumblemanager.cpp
+++ b/src/mumblemanager.cpp
@@ -98,8 +98,8 @@ void MumbleManager::init()
return;
}
- mLinkedMem = (LinkedMem *) MapViewOfFile(hMapObject,
- FILE_MAP_ALL_ACCESS, 0, 0, sizeof(LinkedMem));
+ mLinkedMem = reinterpret_cast<LinkedMem *>(MapViewOfFile(hMapObject,
+ FILE_MAP_ALL_ACCESS, 0, 0, sizeof(LinkedMem)));
if (!mLinkedMem)
{
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index fe113b6d5..dd60fbbe6 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -54,6 +54,6 @@ class ChatHandler
virtual void unIgnoreAll() const = 0;
};
-}
+} // namespace Net
#endif // CHATHANDLER_H
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h
index 06dc7ab8c..7112bb75d 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -59,4 +59,4 @@ class AdminHandler : public Net::AdminHandler
} // namespace Ea
-#endif // NET_EA_ADMINHANDLER_H
+#endif // NET_EA_ADMINHANDLER_H
diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h
index 46a28b908..6552e5a69 100644
--- a/src/net/ea/beinghandler.h
+++ b/src/net/ea/beinghandler.h
@@ -32,7 +32,7 @@ namespace Ea
class BeingHandler : public Net::BeingHandler
{
public:
- BeingHandler(const bool enableSync);
+ explicit BeingHandler(const bool enableSync);
A_DELETE_COPY(BeingHandler)
@@ -104,4 +104,4 @@ class BeingHandler : public Net::BeingHandler
} // namespace Ea
-#endif // NET_EA_BEINGHANDLER_H
+#endif // NET_EA_BEINGHANDLER_H
diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h
index fb7db09e0..8cb4b2951 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/ea/buysellhandler.h
@@ -67,4 +67,4 @@ class BuySellHandler : public Net::BuySellHandler
} // namespace Ea
-#endif // NET_EA_BUYSELLHANDLER_H
+#endif // NET_EA_BUYSELLHANDLER_H
diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h
index be91ef017..aeb8d2d09 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/ea/charserverhandler.h
@@ -94,4 +94,4 @@ class CharServerHandler : public Net::CharServerHandler
} // namespace Ea
-#endif // NET_EA_CHARSERVERHANDLER_H
+#endif // NET_EA_CHARSERVERHANDLER_H
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index fb286a845..327a708cd 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -65,4 +65,4 @@ class ChatHandler : public Net::ChatHandler
} // namespace Ea
-#endif // NET_EA_CHATHANDLER_H
+#endif // NET_EA_CHATHANDLER_H
diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h
index 98b108a0d..5fe74af68 100644
--- a/src/net/ea/gamehandler.h
+++ b/src/net/ea/gamehandler.h
@@ -61,9 +61,9 @@ class GameHandler : public Net::GameHandler
protected:
std::string mMap;
- int mCharID; /// < Saved for map-server switching
+ int mCharID; // < Saved for map-server switching
};
} // namespace Ea
-#endif // NET_EA_GAMEHANDLER_H
+#endif // NET_EA_GAMEHANDLER_H
diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h
index 6558cbef1..fdfd2fea4 100644
--- a/src/net/ea/gui/guildtab.h
+++ b/src/net/ea/gui/guildtab.h
@@ -34,7 +34,7 @@ namespace Ea
class GuildTab : public ChatTab, public ConfigListener
{
public:
- GuildTab(const Widget2 *const widget);
+ explicit GuildTab(const Widget2 *const widget);
A_DELETE_COPY(GuildTab)
diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h
index e1fd7e4c3..a2c782248 100644
--- a/src/net/ea/gui/partytab.h
+++ b/src/net/ea/gui/partytab.h
@@ -34,7 +34,7 @@ namespace Ea
class PartyTab : public ChatTab
{
public:
- PartyTab(const Widget2 *const widget);
+ explicit PartyTab(const Widget2 *const widget);
A_DELETE_COPY(PartyTab)
diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h
index a1a66763c..717641956 100644
--- a/src/net/ea/guildhandler.h
+++ b/src/net/ea/guildhandler.h
@@ -110,6 +110,6 @@ class GuildHandler : public Net::GuildHandler
extern Guild *taGuild;
extern GuildTab *guildTab;
-}
+} // namespace Ea
-#endif // NET_EA_GUILDHANDLER_H
+#endif // NET_EA_GUILDHANDLER_H
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index 415acd2e5..b398053e3 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -212,4 +212,4 @@ class InventoryHandler : public Net::InventoryHandler
} // namespace Ea
-#endif // NET_EA_INVENTORYHANDLER_H
+#endif // NET_EA_INVENTORYHANDLER_H
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
index 5aa1ee51a..cd56f2d12 100644
--- a/src/net/ea/itemhandler.h
+++ b/src/net/ea/itemhandler.h
@@ -45,4 +45,4 @@ class ItemHandler
} // namespace Ea
-#endif // NET_EA_ITEMHANDLER_H
+#endif // NET_EA_ITEMHANDLER_H
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index 0c290f583..38defc09d 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -106,4 +106,4 @@ class LoginHandler : public Net::LoginHandler
} // namespace Ea
-#endif // NET_TA_LOGINHANDLER_H
+#endif // NET_TA_LOGINHANDLER_H
diff --git a/src/net/ea/network.h b/src/net/ea/network.h
index 823fa2714..e0066afaf 100644
--- a/src/net/ea/network.h
+++ b/src/net/ea/network.h
@@ -114,4 +114,4 @@ class Network
} // namespace Ea
-#endif // NET_EA_NETWORK_H
+#endif // NET_EA_NETWORK_H
diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h
index 6bc88aac7..c87cb0ce3 100644
--- a/src/net/ea/npchandler.h
+++ b/src/net/ea/npchandler.h
@@ -77,4 +77,4 @@ class NpcHandler : public Net::NpcHandler
} // namespace Ea
-#endif // NET_EA_NPCHANDLER_H
+#endif // NET_EA_NPCHANDLER_H
diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h
index 9a9867916..5b42f557f 100644
--- a/src/net/ea/partyhandler.h
+++ b/src/net/ea/partyhandler.h
@@ -86,4 +86,4 @@ extern Party *taParty;
} // namespace Ea
-#endif // NET_EA_PARTYHANDLER_H
+#endif // NET_EA_PARTYHANDLER_H
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index 02241df97..e5135ea3d 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -75,4 +75,4 @@ class PlayerHandler : public Net::PlayerHandler
} // namespace Ea
-#endif // NET_EA_PLAYERHANDLER_H
+#endif // NET_EA_PLAYERHANDLER_H
diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h
index 8a5cb93cc..155f81ba7 100644
--- a/src/net/ea/skillhandler.h
+++ b/src/net/ea/skillhandler.h
@@ -46,4 +46,4 @@ class SkillHandler : public Net::SkillHandler
} // namespace Ea
-#endif // NET_EA_SKILLHANDLER_H
+#endif // NET_EA_SKILLHANDLER_H
diff --git a/src/net/ea/token.h b/src/net/ea/token.h
index 199bb9f8a..c358ef8a7 100644
--- a/src/net/ea/token.h
+++ b/src/net/ea/token.h
@@ -41,4 +41,4 @@ struct Token
}
};
-#endif // NET_EA_TOKEN_H
+#endif // NET_EA_TOKEN_H
diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h
index c01f36fd8..9abc7e84b 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/ea/tradehandler.h
@@ -56,4 +56,4 @@ class TradeHandler : public Net::TradeHandler
} // namespace Ea
-#endif // NET_EA_TRADEHANDLER_H
+#endif // NET_EA_TRADEHANDLER_H
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index 9b8490f50..5e8250250 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -53,4 +53,4 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler
} // namespace EAthena
-#endif // NET_EATHENA_ADMINHANDLER_H
+#endif // NET_EATHENA_ADMINHANDLER_H
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index f3680f3c9..76f2cd7cc 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -57,7 +57,7 @@ extern Net::BeingHandler *beingHandler;
namespace EAthena
{
-BeingHandler::BeingHandler(bool enableSync):
+BeingHandler::BeingHandler(const bool enableSync):
MessageHandler(),
Ea::BeingHandler(enableSync)
{
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index cc65c3ea8..50ffb1809 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -36,7 +36,7 @@ namespace EAthena
class BeingHandler final : public MessageHandler, public Ea::BeingHandler
{
public:
- BeingHandler(bool enableSync);
+ explicit BeingHandler(const bool enableSync);
A_DELETE_COPY(BeingHandler)
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 1d31b3c16..e918fecc5 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -63,4 +63,4 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
} // namespace EAthena
-#endif // NET_EATHENA_CHATHANDLER_H
+#endif // NET_EATHENA_CHATHANDLER_H
diff --git a/src/net/eathena/gui/guildtab.h b/src/net/eathena/gui/guildtab.h
index eb4ac077e..50d96427a 100644
--- a/src/net/eathena/gui/guildtab.h
+++ b/src/net/eathena/gui/guildtab.h
@@ -34,7 +34,7 @@ namespace EAthena
class GuildTab : public Ea::GuildTab
{
public:
- GuildTab(const Widget2 *const widget);
+ explicit GuildTab(const Widget2 *const widget);
A_DELETE_COPY(GuildTab)
diff --git a/src/net/eathena/gui/partytab.h b/src/net/eathena/gui/partytab.h
index 1e9bbc920..00828891e 100644
--- a/src/net/eathena/gui/partytab.h
+++ b/src/net/eathena/gui/partytab.h
@@ -34,7 +34,7 @@ namespace EAthena
class PartyTab : public Ea::PartyTab
{
public:
- PartyTab(const Widget2 *const widget);
+ explicit PartyTab(const Widget2 *const widget);
A_DELETE_COPY(PartyTab)
diff --git a/src/net/eathena/guildhandler.h b/src/net/eathena/guildhandler.h
index 26c57411a..ad6a12aee 100644
--- a/src/net/eathena/guildhandler.h
+++ b/src/net/eathena/guildhandler.h
@@ -74,4 +74,4 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler
extern Guild *taGuild;
}
-#endif // NET_EATHENA_GUILDHANDLER_H
+#endif // namespace EAthena
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index 25fc25b17..d33771fb1 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -62,4 +62,4 @@ class InventoryHandler final : public MessageHandler,
} // namespace EAthena
-#endif // NET_EATHENA_INVENTORYHANDLER_H
+#endif // NET_EATHENA_INVENTORYHANDLER_H
diff --git a/src/net/eathena/messagehandler.h b/src/net/eathena/messagehandler.h
index 3572b2152..0139f0ee2 100644
--- a/src/net/eathena/messagehandler.h
+++ b/src/net/eathena/messagehandler.h
@@ -58,4 +58,4 @@ typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr;
}
-#endif // NET_EATHENA_MESSAGEHANDLER_H
+#endif // namespace EAthena
diff --git a/src/net/eathena/messagein.h b/src/net/eathena/messagein.h
index 7279d8dcf..59faa7750 100644
--- a/src/net/eathena/messagein.h
+++ b/src/net/eathena/messagein.h
@@ -54,4 +54,4 @@ class MessageIn final : public Net::MessageIn
}
-#endif // NET_EATHENA_MESSAGEIN_H
+#endif // namespace EAthena
diff --git a/src/net/eathena/messageout.h b/src/net/eathena/messageout.h
index 05c82b6f5..ad1a9bfde 100644
--- a/src/net/eathena/messageout.h
+++ b/src/net/eathena/messageout.h
@@ -46,7 +46,7 @@ class MessageOut final : public Net::MessageOut
/**
* Constructor.
*/
- MessageOut(const short id);
+ explicit MessageOut(const short id);
A_DELETE_COPY(MessageOut)
@@ -72,4 +72,4 @@ class MessageOut final : public Net::MessageOut
}
-#endif // NET_EATHENA_MESSAGEOUT_H
+#endif // namespace EAthena
diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h
index ec79c2c57..3a75fefd3 100644
--- a/src/net/eathena/partyhandler.h
+++ b/src/net/eathena/partyhandler.h
@@ -67,4 +67,4 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler
} // namespace EAthena
-#endif // NET_EATHENA_PARTYHANDLER_H
+#endif // NET_EATHENA_PARTYHANDLER_H
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 77803de28..8ac5dd011 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -47,7 +47,7 @@ namespace EAthena
// KARMA,
// MANNER
};
-}
+} // namespace EAthena
enum
{
@@ -89,8 +89,8 @@ enum
#define SMSG_CHAR_DELETE_SUCCEEDED 0x006f
#define SMSG_CHAR_DELETE_FAILED 0x0070
#define SMSG_CHAR_MAP_INFO 0x0071
-#define SMSG_CHAR_PASSWORD_RESPONSE 0x0062 /**< Custom packet reply \
- to password change request */
+// Custom packet reply to password change request
+#define SMSG_CHAR_PASSWORD_RESPONSE 0x0062
#define SMSG_CHAR_SWITCH_RESPONSE 0x00b3
#define SMSG_CHANGE_MAP_SERVER 0x0092
@@ -134,8 +134,8 @@ enum
#define SMSG_BEING_MOVE2 0x0086 /**< New eAthena being moves */
#define SMSG_BEING_REMOVE 0x0080
#define SMSG_BEING_CHANGE_LOOKS 0x00c3
-#define SMSG_BEING_CHANGE_LOOKS2 0x01d7 /**< Same as 0x00c3, \
- but 16 bit ID */
+// Same as 0x00c3, but 16 bit ID
+#define SMSG_BEING_CHANGE_LOOKS2 0x01d7
#define SMSG_BEING_SELFEFFECT 0x019b
#define SMSG_BEING_EMOTION 0x00c0
#define SMSG_BEING_ACTION 0x008a /**< Attack, sit, stand up, ... */
@@ -166,8 +166,8 @@ enum
#define SMSG_GM_CHAT 0x009a /**< GM announce */
#define SMSG_WALK_RESPONSE 0x0087
-#define SMSG_TRADE_REQUEST 0x00e5 /**< Receiving a request \
- to trade */
+// Receiving a request to trade
+#define SMSG_TRADE_REQUEST 0x00e5
#define SMSG_TRADE_RESPONSE 0x00e7
#define SMSG_TRADE_ITEM_ADD 0x00e9
#define SMSG_TRADE_ITEM_ADD_RESPONSE 0x01b1 /**< Not standard eAthena! */
@@ -190,8 +190,8 @@ enum
#define SMSG_PLAYER_STORAGE_EQUIP 0x00a6 /**< Equipment list for storage */
#define SMSG_PLAYER_STORAGE_STATUS 0x00f2 /**< Slots used and total slots */
#define SMSG_PLAYER_STORAGE_ADD 0x00f4 /**< Add item/equip to storage */
-#define SMSG_PLAYER_STORAGE_REMOVE 0x00f6 /**< Remove item/equip \
- from storage */
+// Remove item/equip from storage
+#define SMSG_PLAYER_STORAGE_REMOVE 0x00f6
#define SMSG_PLAYER_STORAGE_CLOSE 0x00f8 /**< Storage access closed */
#define SMSG_ADMIN_KICK_ACK 0x00cd
@@ -230,8 +230,8 @@ enum
**********************************/
#define CMSG_SERVER_VERSION_REQUEST 0x7530
-#define CMSG_CHAR_PASSWORD_CHANGE 0x0061 /**< Custom change \
- password packet */
+// Custom change password packet
+#define CMSG_CHAR_PASSWORD_CHANGE 0x0061
#define CMSG_CHAR_SERVER_CONNECT 0x0065
#define CMSG_CHAR_SELECT 0x0066
#define CMSG_CHAR_CREATE 0x0067
diff --git a/src/net/eathena/tradehandler.h b/src/net/eathena/tradehandler.h
index 89284f5cd..22a8401c9 100644
--- a/src/net/eathena/tradehandler.h
+++ b/src/net/eathena/tradehandler.h
@@ -59,4 +59,4 @@ class TradeHandler final : public MessageHandler, public Ea::TradeHandler
} // namespace EAthena
-#endif // NET_EATHENA_TRADEHANDLER_H
+#endif // NET_EATHENA_TRADEHANDLER_H
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index 48e6e7afe..d751676e6 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -57,13 +57,10 @@ class InventoryHandler
virtual void closeStorage(const int type) const = 0;
- //void changeCart() = 0;
-
virtual void moveItem2(const int source, const int slot,
const int amount,
const int destination) const = 0;
- // TODO: fix/remove me
virtual size_t getSize(const int type) const A_WARN_UNUSED = 0;
virtual int convertFromServerSlot(const int eAthenaSlot) const = 0;
diff --git a/src/net/logindata.h b/src/net/logindata.h
index a88879310..a36150fa3 100644
--- a/src/net/logindata.h
+++ b/src/net/logindata.h
@@ -70,11 +70,10 @@ class LoginData final
Gender gender;
- bool remember; /**< Whether to store the username. */
- bool registerLogin; /**< Whether an account
- is being registered. */
+ bool remember; // Whether to store the username.
+ bool registerLogin; // Whether an account is being registered.
- unsigned short characterSlots; /**< The number of character slots */
+ unsigned short characterSlots; // The number of character slots
void clear()
{
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h
index e72c9f761..224724e6b 100644
--- a/src/net/loginhandler.h
+++ b/src/net/loginhandler.h
@@ -103,7 +103,7 @@ class LoginHandler
virtual void clearWorlds() = 0;
- virtual ~LoginHandler ()
+ virtual ~LoginHandler()
{ }
protected:
diff --git a/src/net/messageout.h b/src/net/messageout.h
index b69a91b75..4b8ef5fe3 100644
--- a/src/net/messageout.h
+++ b/src/net/messageout.h
@@ -79,7 +79,7 @@ class MessageOut
/**
* Constructor.
*/
- MessageOut(short id);
+ explicit MessageOut(short id);
/**
* Expand the packet data to be able to hold more data.
diff --git a/src/net/packetcounters.h b/src/net/packetcounters.h
index bc3d1de37..95a13ee06 100644
--- a/src/net/packetcounters.h
+++ b/src/net/packetcounters.h
@@ -59,7 +59,6 @@ public:
private:
static void updateCounter(int &currentSec, int &calc, int &counter);
-
};
#endif
diff --git a/src/net/skillhandler.h b/src/net/skillhandler.h
index 97f7415b7..1ecefad15 100644
--- a/src/net/skillhandler.h
+++ b/src/net/skillhandler.h
@@ -30,7 +30,7 @@ namespace Net
class SkillHandler
{
public:
- virtual ~SkillHandler ()
+ virtual ~SkillHandler()
{ }
virtual void useBeing(const int id, const int level,
diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h
index 621bf6466..d3bb2ed0e 100644
--- a/src/net/tmwa/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -53,4 +53,4 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler
} // namespace TmwAthena
-#endif // NET_TA_ADMINHANDLER_H
+#endif // NET_TA_ADMINHANDLER_H
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 07cef46fd..d70dfb16d 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -57,7 +57,7 @@ extern Net::BeingHandler *beingHandler;
namespace TmwAthena
{
-BeingHandler::BeingHandler(bool enableSync) :
+BeingHandler::BeingHandler(const bool enableSync) :
MessageHandler(),
Ea::BeingHandler(enableSync)
{
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index 2aafcc699..6cb6b447e 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -36,7 +36,7 @@ namespace TmwAthena
class BeingHandler final : public MessageHandler, public Ea::BeingHandler
{
public:
- BeingHandler(bool enableSync);
+ explicit BeingHandler(const bool enableSync);
A_DELETE_COPY(BeingHandler)
@@ -58,4 +58,4 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
} // namespace TmwAthena
-#endif // NET_TA_BEINGHANDLER_H
+#endif // NET_TA_BEINGHANDLER_H
diff --git a/src/net/tmwa/buysellhandler.h b/src/net/tmwa/buysellhandler.h
index a74272816..f3f36e5b3 100644
--- a/src/net/tmwa/buysellhandler.h
+++ b/src/net/tmwa/buysellhandler.h
@@ -48,4 +48,4 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler
} // namespace TmwAthena
-#endif // NET_TA_BUYSELLHANDLER_H
+#endif // NET_TA_BUYSELLHANDLER_H
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index a4fc5c572..ab2a9e587 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -72,4 +72,4 @@ class CharServerHandler final : public MessageHandler,
} // namespace TmwAthena
-#endif // NET_TA_CHARSERVERHANDLER_H
+#endif // NET_TA_CHARSERVERHANDLER_H
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index b9a0e71bc..2e1c16d93 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -63,4 +63,4 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
} // namespace TmwAthena
-#endif // NET_TA_CHATHANDLER_H
+#endif // NET_TA_CHATHANDLER_H
diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h
index 37b1d0570..142c644ea 100644
--- a/src/net/tmwa/gamehandler.h
+++ b/src/net/tmwa/gamehandler.h
@@ -62,4 +62,4 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler
} // namespace TmwAthena
-#endif // NET_TA_MAPHANDLER_H
+#endif // NET_TA_MAPHANDLER_H
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 145da6793..ea9952fa2 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -82,4 +82,4 @@ class GeneralHandler final : public MessageHandler,
} // namespace TmwAthena
-#endif // NET_TA_GENERALHANDLER_H
+#endif // NET_TA_GENERALHANDLER_H
diff --git a/src/net/tmwa/gui/guildtab.h b/src/net/tmwa/gui/guildtab.h
index 950c6ad10..b3729fc5a 100644
--- a/src/net/tmwa/gui/guildtab.h
+++ b/src/net/tmwa/gui/guildtab.h
@@ -34,7 +34,7 @@ namespace TmwAthena
class GuildTab : public Ea::GuildTab
{
public:
- GuildTab(const Widget2 *const widget);
+ explicit GuildTab(const Widget2 *const widget);
A_DELETE_COPY(GuildTab)
diff --git a/src/net/tmwa/gui/partytab.h b/src/net/tmwa/gui/partytab.h
index 08ac9bad7..af6e63338 100644
--- a/src/net/tmwa/gui/partytab.h
+++ b/src/net/tmwa/gui/partytab.h
@@ -34,7 +34,7 @@ namespace TmwAthena
class PartyTab : public Ea::PartyTab
{
public:
- PartyTab(const Widget2 *const widget);
+ explicit PartyTab(const Widget2 *const widget);
A_DELETE_COPY(PartyTab)
diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h
index 581c9bc2f..d084350f2 100644
--- a/src/net/tmwa/guildhandler.h
+++ b/src/net/tmwa/guildhandler.h
@@ -74,4 +74,4 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler
extern Guild *taGuild;
}
-#endif // NET_TA_GUILDHANDLER_H
+#endif // namespace TmwAthena
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index 124aedd2f..365951d08 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -62,4 +62,4 @@ class InventoryHandler final : public MessageHandler,
} // namespace TmwAthena
-#endif // NET_TA_INVENTORYHANDLER_H
+#endif // NET_TA_INVENTORYHANDLER_H
diff --git a/src/net/tmwa/itemhandler.h b/src/net/tmwa/itemhandler.h
index a343b4e8d..00c825588 100644
--- a/src/net/tmwa/itemhandler.h
+++ b/src/net/tmwa/itemhandler.h
@@ -42,4 +42,4 @@ class ItemHandler final : public MessageHandler, public Ea::ItemHandler
} // namespace TmwAthena
-#endif // NET_TA_ITEMHANDLER_H
+#endif // NET_TA_ITEMHANDLER_H
diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h
index c327b558b..c1326f274 100644
--- a/src/net/tmwa/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -78,4 +78,4 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
} // namespace TmwAthena
-#endif // NET_TA_LOGINHANDLER_H
+#endif // NET_TA_LOGINHANDLER_H
diff --git a/src/net/tmwa/messagehandler.h b/src/net/tmwa/messagehandler.h
index 79073ffb2..9fd27c8ed 100644
--- a/src/net/tmwa/messagehandler.h
+++ b/src/net/tmwa/messagehandler.h
@@ -58,4 +58,4 @@ typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr;
}
-#endif // NET_TA_MESSAGEHANDLER_H
+#endif // namespace TmwAthena
diff --git a/src/net/tmwa/messagein.h b/src/net/tmwa/messagein.h
index a5db62334..6fc337ae3 100644
--- a/src/net/tmwa/messagein.h
+++ b/src/net/tmwa/messagein.h
@@ -54,4 +54,4 @@ class MessageIn final : public Net::MessageIn
}
-#endif // NET_TA_MESSAGEIN_H
+#endif // namespace TmwAthena
diff --git a/src/net/tmwa/messageout.h b/src/net/tmwa/messageout.h
index 285e333d0..22a6ae458 100644
--- a/src/net/tmwa/messageout.h
+++ b/src/net/tmwa/messageout.h
@@ -46,7 +46,7 @@ class MessageOut final : public Net::MessageOut
/**
* Constructor.
*/
- MessageOut(const short id);
+ explicit MessageOut(const short id);
A_DELETE_COPY(MessageOut)
@@ -72,4 +72,4 @@ class MessageOut final : public Net::MessageOut
}
-#endif // NET_TA_MESSAGEOUT_H
+#endif // namespace TmwAthena
diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h
index 54d082cb5..521a532a2 100644
--- a/src/net/tmwa/network.h
+++ b/src/net/tmwa/network.h
@@ -69,4 +69,4 @@ class Network final : public Ea::Network
} // namespace TmwAthena
-#endif // NET_TA_NETWORK_H
+#endif // NET_TA_NETWORK_H
diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h
index db7d5ade1..53008f615 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -84,4 +84,4 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
} // namespace TmwAthena
-#endif // NET_TA_NPCHANDLER_H
+#endif // NET_TA_NPCHANDLER_H
diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h
index 0d1ca1f38..bdc945e7e 100644
--- a/src/net/tmwa/partyhandler.h
+++ b/src/net/tmwa/partyhandler.h
@@ -67,4 +67,4 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler
} // namespace TmwAthena
-#endif // NET_TA_PARTYHANDLER_H
+#endif // NET_TA_PARTYHANDLER_H
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index b8f019d2c..a0c355c40 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -63,4 +63,4 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
} // namespace TmwAthena
-#endif // NET_TA_PLAYERHANDLER_H
+#endif // NET_TA_PLAYERHANDLER_H
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index f40599fa5..86f78c45d 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -47,7 +47,7 @@ namespace TmwAthena
// KARMA,
// MANNER
};
-}
+} // namespace TmwAthena
enum
{
@@ -92,8 +92,9 @@ enum
#define SMSG_CHAR_DELETE_SUCCEEDED 0x006f
#define SMSG_CHAR_DELETE_FAILED 0x0070
#define SMSG_CHAR_MAP_INFO 0x0071
-#define SMSG_CHAR_PASSWORD_RESPONSE 0x0062 /**< Custom packet reply \
- to password change request */
+
+// Custom packet reply to password change request
+#define SMSG_CHAR_PASSWORD_RESPONSE 0x0062
#define SMSG_CHAR_SWITCH_RESPONSE 0x00b3
#define SMSG_CHANGE_MAP_SERVER 0x0092
@@ -137,8 +138,8 @@ enum
#define SMSG_BEING_MOVE2 0x0086 /**< New eAthena being moves */
#define SMSG_BEING_REMOVE 0x0080
#define SMSG_BEING_CHANGE_LOOKS 0x00c3
-#define SMSG_BEING_CHANGE_LOOKS2 0x01d7 /**< Same as 0x00c3, \
- but 16 bit ID */
+// Same as 0x00c3, but 16 bit ID
+#define SMSG_BEING_CHANGE_LOOKS2 0x01d7
#define SMSG_BEING_SELFEFFECT 0x019b
#define SMSG_BEING_EMOTION 0x00c0
#define SMSG_BEING_ACTION 0x008a /**< Attack, sit, stand up, ... */
@@ -171,8 +172,8 @@ enum
#define SMSG_GM_CHAT 0x009a /**< GM announce */
#define SMSG_WALK_RESPONSE 0x0087
-#define SMSG_TRADE_REQUEST 0x00e5 /**< Receiving a request \
- to trade */
+// Receiving a request to trade
+#define SMSG_TRADE_REQUEST 0x00e5
#define SMSG_TRADE_RESPONSE 0x00e7
#define SMSG_TRADE_ITEM_ADD 0x00e9
#define SMSG_TRADE_ITEM_ADD_RESPONSE 0x01b1 /**< Not standard eAthena! */
@@ -195,8 +196,8 @@ enum
#define SMSG_PLAYER_STORAGE_EQUIP 0x00a6 /**< Equipment list for storage */
#define SMSG_PLAYER_STORAGE_STATUS 0x00f2 /**< Slots used and total slots */
#define SMSG_PLAYER_STORAGE_ADD 0x00f4 /**< Add item/equip to storage */
-#define SMSG_PLAYER_STORAGE_REMOVE 0x00f6 /**< Remove item/equip \
- from storage */
+// Remove item/equip from storage
+#define SMSG_PLAYER_STORAGE_REMOVE 0x00f6
#define SMSG_PLAYER_STORAGE_CLOSE 0x00f8 /**< Storage access closed */
#define SMSG_ADMIN_KICK_ACK 0x00cd
@@ -235,8 +236,8 @@ enum
**********************************/
#define CMSG_SERVER_VERSION_REQUEST 0x7530
-#define CMSG_CHAR_PASSWORD_CHANGE 0x0061 /**< Custom change \
- password packet */
+// Custom change password packet
+#define CMSG_CHAR_PASSWORD_CHANGE 0x0061
#define CMSG_CHAR_SERVER_CONNECT 0x0065
#define CMSG_CHAR_SELECT 0x0066
#define CMSG_CHAR_CREATE 0x0067
diff --git a/src/net/tmwa/questhandler.h b/src/net/tmwa/questhandler.h
index f87b27cc0..e24a48f53 100644
--- a/src/net/tmwa/questhandler.h
+++ b/src/net/tmwa/questhandler.h
@@ -49,4 +49,4 @@ class QuestHandler final : public MessageHandler
} // namespace TmwAthena
-#endif // NET_TA_QUESTHANDLER_H
+#endif // NET_TA_QUESTHANDLER_H
diff --git a/src/net/tmwa/skillhandler.h b/src/net/tmwa/skillhandler.h
index 2dcd60540..b410aff04 100644
--- a/src/net/tmwa/skillhandler.h
+++ b/src/net/tmwa/skillhandler.h
@@ -53,4 +53,4 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler
} // namespace TmwAthena
-#endif // NET_TA_SKILLHANDLER_H
+#endif // NET_TA_SKILLHANDLER_H
diff --git a/src/net/tmwa/tradehandler.h b/src/net/tmwa/tradehandler.h
index 6a4f8f59d..491139369 100644
--- a/src/net/tmwa/tradehandler.h
+++ b/src/net/tmwa/tradehandler.h
@@ -59,4 +59,4 @@ class TradeHandler final : public MessageHandler, public Ea::TradeHandler
} // namespace TmwAthena
-#endif // NET_TA_TRADEHANDLER_H
+#endif // NET_TA_TRADEHANDLER_H
diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h
index 7df9997d5..9cff529dc 100644
--- a/src/normalopenglgraphics.h
+++ b/src/normalopenglgraphics.h
@@ -230,6 +230,4 @@ class NormalOpenGLGraphics final : public Graphics
};
#endif
-//extern unsigned int vertexBufSize;
-
#endif
diff --git a/src/notifications.h b/src/notifications.h
index b87b73670..ced505d1b 100644
--- a/src/notifications.h
+++ b/src/notifications.h
@@ -268,5 +268,5 @@ namespace NotifyManager
{"unknown pvp",
N_("unknown pvp"), SPEECH},
};
-}
+} // namespace NotifyManager
#endif
diff --git a/src/particle.h b/src/particle.h
index 812235f0c..31f3b21f9 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -63,15 +63,14 @@ class Particle : public Actor
DEAD_OTHER = 16,
DEAD_LONG_AGO = 128
};
- static const float PARTICLE_SKY; /**< Maximum Z position
- of particles */
- static int fastPhysics; /**< Mode of squareroot calculation */
- static int particleCount; /**< Current number of particles */
- static int maxCount; /**< Maximum number of particles */
- static int emitterSkip; /**< Duration of pause between two
- emitter updates in ticks */
- static bool enabled; /**< true when non-crucial particle effects
- are disabled */
+ static const float PARTICLE_SKY; // Maximum Z position of particles
+ static int fastPhysics; // Mode of squareroot calculation
+ static int particleCount; // Current number of particles
+ static int maxCount; // Maximum number of particles
+ static int emitterSkip; // Duration of pause between two
+ // emitter updates in ticks
+ static bool enabled; // true when non-crucial particle effects
+ // are disabled
/**
* Constructor.
@@ -157,14 +156,14 @@ class Particle : public Actor
/**
* Adds an emitter to the particle.
*/
- void addEmitter (ParticleEmitter *const emitter)
+ void addEmitter(ParticleEmitter *const emitter)
{ mChildEmitters.push_back(emitter); }
/**
* Sets the position in 3 dimensional space in pixels relative to map.
*/
void moveTo(const Vector &pos)
- { moveBy (pos - mPos); }
+ { moveBy(pos - mPos); }
/**
* Sets the position in 2 dimensional space in pixels relative to map.
@@ -174,7 +173,7 @@ class Particle : public Actor
/**
* Changes the particle position relative
*/
- void moveBy (const Vector &change);
+ void moveBy(const Vector &change);
/**
* Sets the time in game ticks until the particle is destroyed.
@@ -295,52 +294,74 @@ class Particle : public Actor
{ mDeathEffect = effectFile; mDeathEffectConditions = conditions; }
protected:
- float mAlpha; /**< Opacity of the graphical
- representation of the particle */
- int mLifetimeLeft; /**< Lifetime left in game ticks*/
- int mLifetimePast; /**< Age of the particle in game ticks*/
- int mFadeOut; /**< Lifetime in game ticks left where
- fading out begins*/
- int mFadeIn; /**< Age in game ticks where fading in is
- finished*/
- Vector mVelocity; /**< Speed in pixels per game-tick. */
-
- AliveStatus mAlive; /**< Is the particle supposed to be
- drawn and updated?*/
+ // Opacity of the graphical representation of the particle
+ float mAlpha;
+
+ // Lifetime left in game ticks
+ int mLifetimeLeft;
+
+ // Age of the particle in game ticks
+ int mLifetimePast;
+
+ // Lifetime in game ticks left where fading out begins
+ int mFadeOut;
+
+ // Age in game ticks where fading in is finished
+ int mFadeIn;
+
+ // Speed in pixels per game-tick.
+ Vector mVelocity;
+
+ // Is the particle supposed to be drawn and updated?
+ AliveStatus mAlive;
private:
// generic properties
- bool mAutoDelete; /**< May the particle request its deletion
- by the parent particle? */
- Emitters mChildEmitters; /**< List of child emitters. */
- Particles mChildParticles; /**< List of particles controlled by this
- particle */
- bool mAllowSizeAdjust; /**< Can the effect size be adjusted by
- the object props in the map file? */
- std::string mDeathEffect; /**< Particle effect file to be spawned
- when the particle dies */
- signed char mDeathEffectConditions; /**< Bitfield of death conditions
- which trigger spawning of the death
- particle */
+ // May the particle request its deletion by the parent particle?
+ bool mAutoDelete;
+
+ // List of child emitters.
+ Emitters mChildEmitters;
+
+ // List of particles controlled by this particle
+ Particles mChildParticles;
+
+ // Can the effect size be adjusted by the object props in the map file?
+ bool mAllowSizeAdjust;
+
+ // Particle effect file to be spawned when the particle dies
+ std::string mDeathEffect;
+
+ // Bitfield of death conditions which trigger spawning
+ // of the death particle
+ signed char mDeathEffectConditions;
// dynamic particle
- float mGravity; /**< Downward acceleration in pixels per
- game-tick. */
- int mRandomness; /**< Ammount of random vector change */
- float mBounce; /**< How much the particle bounces off when
- hitting the ground */
- bool mFollow; /**< is this particle moved when its parent
- particle moves? */
+ // Downward acceleration in pixels per game-tick.
+ float mGravity;
+
+ // Ammount of random vector change
+ int mRandomness;
+
+ // How much the particle bounces off when hitting the ground
+ float mBounce;
+
+ // is this particle moved when its parent particle moves?
+ bool mFollow;
// follow-point particles
- Particle *mTarget; /**< The particle that attracts
- this particle*/
- float mAcceleration; /**< Acceleration towards the target
- particle in pixels per game-tick*/
- float mInvDieDistance; /**< Distance in pixels from the target
- particle that causes the destruction
- of the particle*/
- float mMomentum; /**< How much speed the particle retains
- after each game tick*/
+
+ // The particle that attracts this particle
+ Particle *mTarget;
+
+ // Acceleration towards the target particle in pixels per game-tick
+ float mAcceleration;
+
+ // Distance in pixels from the target particle that causes
+ // the destruction of the particle
+ float mInvDieDistance;
+
+ // How much speed the particle retains after each game tick
+ float mMomentum;
};
extern Particle *particleEngine;
diff --git a/src/particleemitter.h b/src/particleemitter.h
index b879ffa13..83cd7af82 100644
--- a/src/particleemitter.h
+++ b/src/particleemitter.h
@@ -72,7 +72,7 @@ class ParticleEmitter final
* Sets the target of the particles that are created
*/
void setTarget(Particle *const target)
- { mParticleTarget = target; };
+ { mParticleTarget = target; }
/**
* Changes the size of the emitter so that the effect fills a
@@ -123,23 +123,30 @@ class ParticleEmitter final
ParticleEmitterProp<int> mParticleFadeOut;
ParticleEmitterProp<int> mParticleFadeIn;
- Map *mMap; /**< Map the particles are spawned on */
+ // Map the particles are spawned on
+ Map *mMap;
- ParticleEmitterProp<int> mOutput; /**< Number of particles spawned
- per update */
- ParticleEmitterProp<int> mOutputPause; /**< Pause in frames between
- two spawns */
+ // Number of particles spawned per update
+ ParticleEmitterProp<int> mOutput;
+
+ // Pause in frames between two spawns
+ ParticleEmitterProp<int> mOutputPause;
int mOutputPauseLeft;
/*
* Graphical representation of the particles
*/
- Image *mParticleImage; /**< Particle image, if used */
- Animation mParticleAnimation; /**< Filename of particle
- animation file */
- Animation mParticleRotation; /**< Filename of particle rotation file */
- ParticleEmitterProp<float> mParticleAlpha; /**< Opacity of the
- graphical representation of the particles */
+ // Particle image, if used
+ Image *mParticleImage;
+
+ // Filename of particle animation file
+ Animation mParticleAnimation;
+
+ // Filename of particle rotation file
+ Animation mParticleRotation;
+
+ // Opacity of the graphical representation of the particles
+ ParticleEmitterProp<float> mParticleAlpha;
/*
* Death effect of the particles
@@ -147,7 +154,7 @@ class ParticleEmitter final
std::string mDeathEffect;
signed char mDeathEffectConditions;
- /** List of emitters the spawned particles are equipped with */
+ // List of emitters the spawned particles are equipped with
std::list<ParticleEmitter> mParticleChildEmitters;
std::vector<ImageSet*> mTempSets;
diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h
index 644c66ce3..24d302404 100644
--- a/src/particleemitterprop.h
+++ b/src/particleemitterprop.h
@@ -110,7 +110,7 @@ template <typename T> struct ParticleEmitterProp final
break;
case FUNC_NONE:
default:
- //nothing
+ // nothing
break;
}
diff --git a/src/party.h b/src/party.h
index aad6adaad..315c9ab69 100644
--- a/src/party.h
+++ b/src/party.h
@@ -175,4 +175,4 @@ private:
bool mCanInviteUsers;
};
-#endif // PARTY_H
+#endif // PARTY_H
diff --git a/src/playerrelations.h b/src/playerrelations.h
index c4c5e643a..8ca7454b2 100644
--- a/src/playerrelations.h
+++ b/src/playerrelations.h
@@ -66,7 +66,7 @@ struct PlayerRelation final
A_DELETE_COPY(PlayerRelation)
- Relation mRelation; // bitmask for all of the above
+ Relation mRelation; // bitmask for all of the above
};
@@ -257,8 +257,8 @@ class PlayerRelationsManager final
private:
void signalUpdate(const std::string &name);
- bool mPersistIgnores; // If NOT set, we delete the
- // ignored data upon reloading
+ bool mPersistIgnores; // If NOT set, we delete the
+ // ignored data upon reloading
unsigned int mDefaultPermissions;
bool checkName(const std::string &name) const A_WARN_UNUSED;
@@ -270,8 +270,8 @@ class PlayerRelationsManager final
};
-extern PlayerRelationsManager player_relations; // singleton representation
- // of player relations
+extern PlayerRelationsManager player_relations; // singleton representation
+ // of player relations
-#endif // PLAYER_RELATIONS_H
+#endif // PLAYER_RELATIONS_H
diff --git a/src/position.h b/src/position.h
index 9b4c6a7f9..9b4bb80ba 100644
--- a/src/position.h
+++ b/src/position.h
@@ -55,4 +55,4 @@ std::ostream& operator <<(std::ostream &os, const Position &p);
*/
std::ostream& operator <<(std::ostream &os, const Path &path);
-#endif // POSITION_H
+#endif // POSITION_H
diff --git a/src/properties.h b/src/properties.h
index 45751afd7..fac343b17 100644
--- a/src/properties.h
+++ b/src/properties.h
@@ -125,7 +125,6 @@ class Properties
private:
typedef std::map<std::string, std::string> PropertyMap;
PropertyMap mProperties;
-
};
#endif
diff --git a/src/resources/animation.h b/src/resources/animation.h
index 3bff740bc..d0217cdc1 100644
--- a/src/resources/animation.h
+++ b/src/resources/animation.h
@@ -101,7 +101,6 @@ class Animation final
static bool isTerminator(const Frame &phase) A_WARN_UNUSED;
protected:
-
typedef std::vector<Frame> Frames;
typedef Frames::iterator FramesIter;
typedef Frames::reverse_iterator FramesRevIter;
diff --git a/src/resources/atlasmanager.h b/src/resources/atlasmanager.h
index bfb2f4368..845e979d8 100644
--- a/src/resources/atlasmanager.h
+++ b/src/resources/atlasmanager.h
@@ -33,7 +33,7 @@ class Resource;
struct AtlasItem final
{
- AtlasItem(Image *image0) :
+ explicit AtlasItem(Image *image0) :
image(image0),
x(0),
y(0),
diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h
index f1b978543..b5ca37bf7 100644
--- a/src/resources/beinginfo.h
+++ b/src/resources/beinginfo.h
@@ -219,4 +219,4 @@ class BeingInfo final
typedef std::map<int, BeingInfo*> BeingInfos;
typedef BeingInfos::iterator BeingInfoIterator;
-#endif // BEINGINFO_H
+#endif // BEINGINFO_H
diff --git a/src/resources/chardb.h b/src/resources/chardb.h
index fd7770061..e6ec15a3c 100644
--- a/src/resources/chardb.h
+++ b/src/resources/chardb.h
@@ -62,6 +62,6 @@ namespace CharDB
unsigned getSumStat() A_WARN_UNUSED;
const std::vector<int> &getDefaultItems() A_WARN_UNUSED;
-}
+} // namespace CharDB
#endif
diff --git a/src/resources/colordb.h b/src/resources/colordb.h
index faf9c0a33..75fff94a3 100644
--- a/src/resources/colordb.h
+++ b/src/resources/colordb.h
@@ -82,6 +82,6 @@ namespace ColorDB
typedef Colors::iterator ColorIterator;
typedef std::map <std::string, std::map <int, ItemColor> > ColorLists;
typedef ColorLists::iterator ColorListsIterator;
-}
+} // namespace ColorDB
#endif
diff --git a/src/resources/cursor.cpp b/src/resources/cursor.cpp
index 5ce5527df..6113bed5d 100644
--- a/src/resources/cursor.cpp
+++ b/src/resources/cursor.cpp
@@ -64,4 +64,4 @@ namespace Cursor
}
return CURSOR_POINTER;
}
-}// namespace Cursor
+} // namespace Cursor
diff --git a/src/resources/cursor.h b/src/resources/cursor.h
index f6852f447..aaaf2c758 100644
--- a/src/resources/cursor.h
+++ b/src/resources/cursor.h
@@ -57,6 +57,6 @@ namespace Cursor
};
Cursor stringToCursor(const std::string &name) A_WARN_UNUSED;
-}
+} // namespace Cursor
#endif
diff --git a/src/resources/dye.h b/src/resources/dye.h
index 557e8524e..442a514d7 100644
--- a/src/resources/dye.h
+++ b/src/resources/dye.h
@@ -95,7 +95,6 @@ class DyePalette final
class Dye final
{
public:
-
/**
* Creates a set of palettes based on the given string.
*
@@ -140,7 +139,6 @@ class Dye final
int getType() const A_WARN_UNUSED;
private:
-
/**
* The order of the palettes, as well as their uppercase letter, is:
*
diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h
index 3e4cd7789..d105794b3 100644
--- a/src/resources/emotedb.h
+++ b/src/resources/emotedb.h
@@ -85,6 +85,6 @@ namespace EmoteDB
const int &getLast() A_WARN_UNUSED;
typedef EmoteInfos::iterator EmoteInfosIterator;
-}
+} // namespace EmoteDB
#endif
diff --git a/src/resources/image.h b/src/resources/image.h
index f383354cc..d7316d527 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -32,12 +32,6 @@
#ifdef USE_OPENGL
-/* The definition of OpenGL extensions by SDL is giving problems with recent
- * gl.h headers, since they also include these definitions. As we're not using
- * extensions anyway it's safe to just disable the SDL version.
- */
-//#define NO_SDL_GLEXT
-
#ifdef ANDROID
#include <GLES/gl.h>
#else
@@ -184,7 +178,6 @@ class Image : public Resource
SDL_Rect mBounds;
protected:
-
// -----------------------
// Generic protected members
// -----------------------
diff --git a/src/resources/itemdb.h b/src/resources/itemdb.h
index edfbd31dc..cde9b95b0 100644
--- a/src/resources/itemdb.h
+++ b/src/resources/itemdb.h
@@ -75,6 +75,6 @@ namespace ItemDB
};
void setStatsList(const std::vector<Stat> &stats);
-}
+} // namespace ItemDB
#endif
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 30b22cec8..0a3b20c61 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -63,7 +63,8 @@ enum EquipmentSlot
EQUIP_FIGHT1_SLOT = 8,
EQUIP_FIGHT2_SLOT = 9,
// Projectile:
- // this item does not amount to one, it only indicates the chosen projectile.
+ // this item does not amount to one, it only
+ // indicates the chosen projectile.
EQUIP_PROJECTILE_SLOT = 10
};
@@ -78,17 +79,17 @@ enum ItemType
ITEM_EQUIPMENT_ONE_HAND_WEAPON,
ITEM_EQUIPMENT_TWO_HANDS_WEAPON,
ITEM_EQUIPMENT_TORSO,
- ITEM_EQUIPMENT_ARMS, // 5
+ ITEM_EQUIPMENT_ARMS, // 5
ITEM_EQUIPMENT_HEAD,
ITEM_EQUIPMENT_LEGS,
ITEM_EQUIPMENT_SHIELD,
ITEM_EQUIPMENT_RING,
- ITEM_EQUIPMENT_NECKLACE, // 10
+ ITEM_EQUIPMENT_NECKLACE, // 10
ITEM_EQUIPMENT_FEET,
ITEM_EQUIPMENT_AMMO,
ITEM_EQUIPMENT_CHARM,
ITEM_SPRITE_RACE,
- ITEM_SPRITE_HAIR // 15
+ ITEM_SPRITE_HAIR // 15
};
// sprite, <itemfrom, itemto>
@@ -179,7 +180,8 @@ class ItemInfo final
void setAttackAction(std::string attackAction);
- // Handlers for seting and getting the string used for particles when attacking
+ // Handlers for seting and getting the string
+ // used for particles when attacking
void setMissileParticleFile(const std::string &s)
{ mMissileParticleFile = s; }
diff --git a/src/resources/mapdb.h b/src/resources/mapdb.h
index 8bee4668a..574c99780 100644
--- a/src/resources/mapdb.h
+++ b/src/resources/mapdb.h
@@ -66,6 +66,6 @@ namespace MapDB
// atlas to files map
typedef std::map<std::string, StringVect> Atlases;
typedef Atlases::iterator AtlasIter;
-}
+} // namespace MapDB
#endif
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index e2352136e..32def7446 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -58,7 +58,6 @@ class ResourceManager final
friend class Resource;
public:
-
typedef Resource *(*loader)(SDL_RWops *);
typedef Resource *(*generator)(const void *const);
diff --git a/src/resources/soundeffect.h b/src/resources/soundeffect.h
index c375fa0f8..33a406128 100644
--- a/src/resources/soundeffect.h
+++ b/src/resources/soundeffect.h
@@ -77,4 +77,4 @@ class SoundEffect final : public Resource
Mix_Chunk *mChunk;
};
-#endif // SOUND_EFFECT_H
+#endif // SOUND_EFFECT_H
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 3a8fe5a01..02090e809 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -90,7 +90,7 @@ namespace SpriteAction
static const std::string USE_ITEM = "item";
static const std::string SPAWN = "spawn";
static const std::string INVALID("");
-}
+} // namespace SpriteAction
enum SpriteDirection
{
@@ -213,4 +213,4 @@ class SpriteDef final : public Resource
std::set<std::string> mProcessedFiles;
};
-#endif // SPRITEDEF_H
+#endif // SPRITEDEF_H
diff --git a/src/resources/wallpaper.h b/src/resources/wallpaper.h
index 283e44a81..cb3078b14 100644
--- a/src/resources/wallpaper.h
+++ b/src/resources/wallpaper.h
@@ -51,4 +51,4 @@ class Wallpaper final
const int height) A_WARN_UNUSED;
};
-#endif // WALLPAPER_H
+#endif // WALLPAPER_H
diff --git a/src/spellmanager.h b/src/spellmanager.h
index 1b25fd83d..25e127e8a 100644
--- a/src/spellmanager.h
+++ b/src/spellmanager.h
@@ -81,4 +81,4 @@ class SpellManager final
extern SpellManager *spellManager;
-#endif // SPELLMANAGER_H
+#endif // SPELLMANAGER_H
diff --git a/src/sprite.h b/src/sprite.h
index d8b5d989d..8a25d11c8 100644
--- a/src/sprite.h
+++ b/src/sprite.h
@@ -120,4 +120,4 @@ class Sprite
float mAlpha; /**< The alpha opacity used to draw */
};
-#endif // SPRITE_H
+#endif // SPRITE_H
diff --git a/src/statuseffect.h b/src/statuseffect.h
index 5375b383d..442d3bd06 100644
--- a/src/statuseffect.h
+++ b/src/statuseffect.h
@@ -115,4 +115,4 @@ private:
bool mPersistentParticleEffect;
};
-#endif // !defined(STATUS_EFFECT_H)
+#endif // !defined(STATUS_EFFECT_H)
diff --git a/src/test/testlauncher.h b/src/test/testlauncher.h
index 23314cc41..389c898dd 100644
--- a/src/test/testlauncher.h
+++ b/src/test/testlauncher.h
@@ -34,7 +34,7 @@
class TestLauncher
{
public:
- TestLauncher(std::string test);
+ explicit TestLauncher(std::string test);
A_DELETE_COPY(TestLauncher)
@@ -66,4 +66,4 @@ class TestLauncher
};
#endif
-#endif // TEST_TESTLAUNCHER_H
+#endif // TEST_TESTLAUNCHER_H
diff --git a/src/test/testmain.h b/src/test/testmain.h
index 5e9a94f0d..b0ad82e95 100644
--- a/src/test/testmain.h
+++ b/src/test/testmain.h
@@ -78,4 +78,4 @@ class TestMain
};
#endif
-#endif // TEST_TESTMAIN_H
+#endif // TEST_TESTMAIN_H
diff --git a/src/text.h b/src/text.h
index b0ea29c03..c235794e3 100644
--- a/src/text.h
+++ b/src/text.h
@@ -119,4 +119,4 @@ class FlashText final : public Text
int mTime; /**< Time left for flashing */
};
-#endif // TEXT_H
+#endif // TEXT_H
diff --git a/src/textmanager.h b/src/textmanager.h
index e3c9988fe..33e15c5d4 100644
--- a/src/textmanager.h
+++ b/src/textmanager.h
@@ -78,4 +78,4 @@ class TextManager final
extern TextManager *textManager;
-#endif // TEXTMANAGER_H
+#endif // TEXTMANAGER_H
diff --git a/src/units.h b/src/units.h
index ac04f2b10..accfa4189 100644
--- a/src/units.h
+++ b/src/units.h
@@ -48,4 +48,4 @@ class Units final
static std::string formatWeight(const int value) A_WARN_UNUSED;
};
-#endif // UNITS_H
+#endif // UNITS_H
diff --git a/src/utils/checkutils.h b/src/utils/checkutils.h
index 9dad2a669..f55ecaece 100644
--- a/src/utils/checkutils.h
+++ b/src/utils/checkutils.h
@@ -29,4 +29,4 @@ bool reportFalseReal(const bool val, const char *const file,
bool reportTrueReal(const bool val, const char *const file,
const unsigned line);
-#endif // UTILS_CHECKUTILS_H
+#endif // UTILS_CHECKUTILS_H
diff --git a/src/utils/gettext.h b/src/utils/gettext.h
index c9ffd6c27..ed686cffd 100644
--- a/src/utils/gettext.h
+++ b/src/utils/gettext.h
@@ -42,4 +42,4 @@
#endif
-#endif // UTILS_GETTEXT_H
+#endif // UTILS_GETTEXT_H
diff --git a/src/utils/langs.h b/src/utils/langs.h
index a10fd72d7..a59712048 100644
--- a/src/utils/langs.h
+++ b/src/utils/langs.h
@@ -38,4 +38,4 @@ std::string getLangSimple() A_WARN_UNUSED;
std::string getLangShort() A_WARN_UNUSED;
-#endif // UTILS_LANGS_H
+#endif // UTILS_LANGS_H
diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h
index c58777d06..924a26fc4 100644
--- a/src/utils/mathutils.h
+++ b/src/utils/mathutils.h
@@ -132,4 +132,4 @@ inline int powerOfTwo(const int input)
return value;
}
-#endif // UTILS_MATHUTILS_H
+#endif // UTILS_MATHUTILS_H
diff --git a/src/utils/mutex.h b/src/utils/mutex.h
index 5eee6761c..03ecc9fe1 100644
--- a/src/utils/mutex.h
+++ b/src/utils/mutex.h
@@ -57,7 +57,7 @@ class Mutex
class MutexLocker
{
public:
- MutexLocker(Mutex *mutex);
+ explicit MutexLocker(Mutex *mutex);
~MutexLocker();
@@ -100,4 +100,4 @@ inline MutexLocker::~MutexLocker()
mMutex->unlock();
}
-#endif // MUTEX_H
+#endif // MUTEX_H
diff --git a/src/utils/paths.h b/src/utils/paths.h
index 26a9dea27..b9cdcca3c 100644
--- a/src/utils/paths.h
+++ b/src/utils/paths.h
@@ -39,4 +39,4 @@ std::string getSelfName() A_WARN_UNUSED;
std::string getDesktopDir() A_WARN_UNUSED;
-#endif // UTILS_PATHS_H
+#endif // UTILS_PATHS_H
diff --git a/src/utils/perfomance.h b/src/utils/perfomance.h
index bd441e06b..a70bc42a6 100644
--- a/src/utils/perfomance.h
+++ b/src/utils/perfomance.h
@@ -50,7 +50,7 @@ namespace Perfomance
class Func
{
public:
- Func(const std::string &str) :
+ explicit Func(const std::string &str) :
name(str)
{
blockStart(str);
@@ -63,14 +63,14 @@ namespace Perfomance
std::string name;
};
-}
+} // namespace Perfomance
-#else // USE_PROFILER
+#else // USE_PROFILER
#define PROFILER_START()
#define BLOCK_START(name)
#define BLOCK_END(name)
#define FUNC_BLOCK(name, id)
-#endif // USE_PROFILER
-#endif // UTILS_PEFOMANCE_H
+#endif // USE_PROFILER
+#endif // UTILS_PEFOMANCE_H
diff --git a/src/utils/physfstools.h b/src/utils/physfstools.h
index 7bfe6b14d..0ad59e283 100644
--- a/src/utils/physfstools.h
+++ b/src/utils/physfstools.h
@@ -41,8 +41,8 @@ namespace PhysFs
bool removeFromSearchPath(const char *oldDir);
const char *getRealDir(const char *filename);
bool mkdir(const char *dirName);
-}
+} // namespace PhysFs
extern const char *dirSeparator;
-#endif // UTILS_PHYSFS_H
+#endif // UTILS_PHYSFS_H
diff --git a/src/utils/process.h b/src/utils/process.h
index 95c868372..c3de0d175 100644
--- a/src/utils/process.h
+++ b/src/utils/process.h
@@ -33,4 +33,4 @@ bool openBrowser(std::string url);
void setPriority(const bool big);
-#endif // UTILS_PROCESS_H
+#endif // UTILS_PROCESS_H
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 6aff503e2..9d1afe717 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -104,14 +104,6 @@ std::string strprintf(const char *const format, ...) A_WARN_UNUSED
;
/**
- * Removes bad characters from a string
- *
- * @param str the string to remove the bad chars from
- * @return a reference to the string without bad chars
- */
-//std::string &removeBadChars(std::string &str);
-
-/**
* Removes colors from a string
*
* @param msg the string to remove the colors from
@@ -229,4 +221,4 @@ std::string encodeLinkText(std::string data);
std::string decodeLinkText(std::string data);
-#endif // UTILS_STRINGUTILS_H
+#endif // UTILS_STRINGUTILS_H
diff --git a/src/utils/translation/podict.h b/src/utils/translation/podict.h
index ba7b250d3..a39cee73f 100644
--- a/src/utils/translation/podict.h
+++ b/src/utils/translation/podict.h
@@ -31,7 +31,7 @@ typedef std::map <std::string, std::string> PoMap;
class PoDict final
{
public:
- PoDict(std::string lang);
+ explicit PoDict(std::string lang);
A_DELETE_COPY(PoDict)
@@ -60,4 +60,4 @@ class PoDict final
extern PoDict *translator;
-#endif // UTILS_TRANSLATION_PODICT_H
+#endif // UTILS_TRANSLATION_PODICT_H
diff --git a/src/utils/translation/poparser.h b/src/utils/translation/poparser.h
index b5bbd03c5..1d13fa694 100644
--- a/src/utils/translation/poparser.h
+++ b/src/utils/translation/poparser.h
@@ -83,4 +83,4 @@ class PoParser final
bool mReadingStr;
};
-#endif // UTILS_TRANSLATION_POPARSER_H
+#endif // UTILS_TRANSLATION_POPARSER_H
diff --git a/src/utils/translation/translationmanager.h b/src/utils/translation/translationmanager.h
index cc9c8b6a5..8a6f0c1e0 100644
--- a/src/utils/translation/translationmanager.h
+++ b/src/utils/translation/translationmanager.h
@@ -45,4 +45,4 @@ class TranslationManager final
StringVect &lines);
};
-#endif // UTILS_TRANSLATION_MANAGER_H
+#endif // UTILS_TRANSLATION_MANAGER_H
diff --git a/src/utils/xml.h b/src/utils/xml.h
index 43065fa62..75f671b02 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -139,9 +139,9 @@ namespace XML
void initXML();
void cleanupXML();
-}
+} // namespace XML
#define for_each_xml_child_node(var, parent) \
for (XmlNodePtr var = parent->xmlChildrenNode; var; var = var->next)
-#endif // XML_H
+#endif // XML_H
diff --git a/src/variabledata.h b/src/variabledata.h
index 06969a089..af5f7ab9c 100644
--- a/src/variabledata.h
+++ b/src/variabledata.h
@@ -39,7 +39,7 @@ class VariableData
};
virtual ~VariableData()
- {};
+ {}
virtual int getType() const A_WARN_UNUSED = 0;
};
diff --git a/src/vector.h b/src/vector.h
index 08deff1a2..02d53d893 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -199,4 +199,4 @@ class Vector final
*/
std::ostream& operator <<(std::ostream &os, const Vector &v);
-#endif // VECTOR_H
+#endif // VECTOR_H