summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-22 01:34:49 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-22 01:34:49 +0300
commit3dcf21babe03cee5080a25e787e1d7e72124288e (patch)
tree7051c6beddd3e7e1de960bb84e46601db8e2e5c4
parentc217b7141df580b686a0eef085bd0eb0a8e6771a (diff)
downloadmv-3dcf21babe03cee5080a25e787e1d7e72124288e.tar.gz
mv-3dcf21babe03cee5080a25e787e1d7e72124288e.tar.bz2
mv-3dcf21babe03cee5080a25e787e1d7e72124288e.tar.xz
mv-3dcf21babe03cee5080a25e787e1d7e72124288e.zip
Add final keyword to most classes.
-rw-r--r--src/actorsprite.cpp2
-rw-r--r--src/actorspritemanager.cpp6
-rw-r--r--src/actorspritemanager.h2
-rw-r--r--src/animatedsprite.h2
-rw-r--r--src/animationdelayload.h4
-rw-r--r--src/animationparticle.h2
-rw-r--r--src/auctionmanager.h4
-rw-r--r--src/being.cpp2
-rw-r--r--src/being.h2
-rw-r--r--src/channel.h4
-rw-r--r--src/channelmanager.h4
-rw-r--r--src/chatlogger.h4
-rw-r--r--src/client.cpp4
-rw-r--r--src/client.h2
-rw-r--r--src/commandhandler.h2
-rw-r--r--src/compoundsprite.h2
-rw-r--r--src/configuration.h2
-rw-r--r--src/depricatedevent.h4
-rw-r--r--src/dropshortcut.h4
-rw-r--r--src/effectmanager.h4
-rw-r--r--src/emoteshortcut.h4
-rw-r--r--src/flooritem.h2
-rw-r--r--src/game.h2
-rw-r--r--src/graphics.h2
-rw-r--r--src/graphicsmanager.h4
-rw-r--r--src/graphicsvertexes.h12
-rw-r--r--src/gui/beingpopup.h2
-rw-r--r--src/gui/botcheckerwindow.cpp2
-rw-r--r--src/gui/botcheckerwindow.h7
-rw-r--r--src/gui/buydialog.h4
-rw-r--r--src/gui/buyselldialog.h2
-rw-r--r--src/gui/changeemaildialog.h2
-rw-r--r--src/gui/changepassworddialog.h2
-rw-r--r--src/gui/charcreatedialog.h6
-rw-r--r--src/gui/charselectdialog.cpp4
-rw-r--r--src/gui/charselectdialog.h6
-rw-r--r--src/gui/chatwindow.cpp4
-rw-r--r--src/gui/chatwindow.h12
-rw-r--r--src/gui/connectiondialog.h2
-rw-r--r--src/gui/debugwindow.h8
-rw-r--r--src/gui/didyouknowwindow.h5
-rw-r--r--src/gui/editdialog.h2
-rw-r--r--src/gui/editserverdialog.h6
-rw-r--r--src/gui/equipmentwindow.h4
-rw-r--r--src/gui/focushandler.h4
-rw-r--r--src/gui/gui.cpp2
-rw-r--r--src/gui/gui.h2
-rw-r--r--src/gui/helpwindow.h6
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/inventorywindow.h12
-rw-r--r--src/gui/itemamountwindow.cpp2
-rw-r--r--src/gui/itemamountwindow.h6
-rw-r--r--src/gui/itempopup.h2
-rw-r--r--src/gui/killstats.h4
-rw-r--r--src/gui/logindialog.cpp4
-rw-r--r--src/gui/logindialog.h4
-rw-r--r--src/gui/minimap.h2
-rw-r--r--src/gui/ministatuswindow.h6
-rw-r--r--src/gui/npcdialog.h4
-rw-r--r--src/gui/npcpostdialog.h2
-rw-r--r--src/gui/okdialog.h2
-rw-r--r--src/gui/outfitwindow.h2
-rw-r--r--src/gui/popupmenu.h4
-rw-r--r--src/gui/questswindow.cpp6
-rw-r--r--src/gui/questswindow.h2
-rw-r--r--src/gui/quitdialog.h4
-rw-r--r--src/gui/registerdialog.h6
-rw-r--r--src/gui/sdlfont.cpp2
-rw-r--r--src/gui/sdlfont.h4
-rw-r--r--src/gui/sdlinput.h2
-rw-r--r--src/gui/selldialog.h6
-rw-r--r--src/gui/serverdialog.cpp2
-rw-r--r--src/gui/serverdialog.h2
-rw-r--r--src/gui/setup.h2
-rw-r--r--src/gui/setup_audio.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.cpp2
-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.cpp6
-rw-r--r--src/gui/setup_relations.h4
-rw-r--r--src/gui/setup_theme.cpp11
-rw-r--r--src/gui/setup_theme.h2
-rw-r--r--src/gui/setup_video.cpp4
-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/shopwindow.h5
-rw-r--r--src/gui/shortcutwindow.cpp2
-rw-r--r--src/gui/shortcutwindow.h2
-rw-r--r--src/gui/skilldialog.cpp6
-rw-r--r--src/gui/skilldialog.h4
-rw-r--r--src/gui/socialwindow.cpp22
-rw-r--r--src/gui/socialwindow.h2
-rw-r--r--src/gui/specialswindow.cpp2
-rw-r--r--src/gui/specialswindow.h2
-rw-r--r--src/gui/speechbubble.h2
-rw-r--r--src/gui/spellpopup.h2
-rw-r--r--src/gui/statuspopup.h2
-rw-r--r--src/gui/statuswindow.cpp4
-rw-r--r--src/gui/statuswindow.h6
-rw-r--r--src/gui/textcommandeditor.cpp6
-rw-r--r--src/gui/textcommandeditor.h2
-rw-r--r--src/gui/textdialog.h2
-rw-r--r--src/gui/textpopup.h2
-rw-r--r--src/gui/theme.cpp4
-rw-r--r--src/gui/theme.h4
-rw-r--r--src/gui/tradewindow.h6
-rw-r--r--src/gui/unregisterdialog.h2
-rw-r--r--src/gui/updaterwindow.h10
-rw-r--r--src/gui/userpalette.h2
-rw-r--r--src/gui/viewport.h6
-rw-r--r--src/gui/whoisonline.cpp2
-rw-r--r--src/gui/whoisonline.h10
-rw-r--r--src/gui/widgets/avatarlistbox.h2
-rw-r--r--src/gui/widgets/battletab.h2
-rw-r--r--src/gui/widgets/browserbox.h8
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/channeltab.h2
-rw-r--r--src/gui/widgets/checkbox.h2
-rw-r--r--src/gui/widgets/desktop.h2
-rw-r--r--src/gui/widgets/dropdown.h2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h2
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h2
-rw-r--r--src/gui/widgets/extendedlistbox.h2
-rw-r--r--src/gui/widgets/flowcontainer.h4
-rw-r--r--src/gui/widgets/guildchattab.h2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/guitable.h8
-rw-r--r--src/gui/widgets/horizontcontainer.h2
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/inttextfield.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp12
-rw-r--r--src/gui/widgets/itemcontainer.h8
-rw-r--r--src/gui/widgets/itemlinkhandler.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/layout.h6
-rw-r--r--src/gui/widgets/layouthelper.h2
-rw-r--r--src/gui/widgets/mouseevent.h2
-rw-r--r--src/gui/widgets/passwordfield.h2
-rw-r--r--src/gui/widgets/playerbox.h2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/progressindicator.h2
-rw-r--r--src/gui/widgets/radiobutton.h2
-rw-r--r--src/gui/widgets/radiogroup.h2
-rw-r--r--src/gui/widgets/scrollarea.h2
-rw-r--r--src/gui/widgets/setupitem.h16
-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.h6
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h2
-rw-r--r--src/gui/widgets/tabbedarea.h2
-rw-r--r--src/gui/widgets/tablemodel.h4
-rw-r--r--src/gui/widgets/tabstrip.h2
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/textpreview.h2
-rw-r--r--src/gui/widgets/tradetab.h2
-rw-r--r--src/gui/widgets/vertcontainer.h2
-rw-r--r--src/gui/widgets/whispertab.h2
-rw-r--r--src/gui/windowmenu.h10
-rw-r--r--src/gui/worldselectdialog.cpp2
-rw-r--r--src/gui/worldselectdialog.h4
-rw-r--r--src/guichan/include/guichan/actionevent.hpp4
-rw-r--r--src/guichan/include/guichan/cliprectangle.hpp4
-rw-r--r--src/guichan/include/guichan/color.hpp4
-rw-r--r--src/guichan/include/guichan/defaultfont.hpp4
-rw-r--r--src/guichan/include/guichan/exception.hpp4
-rw-r--r--src/guichan/include/guichan/key.hpp4
-rw-r--r--src/guichan/include/guichan/mouseinput.hpp4
-rw-r--r--src/guichan/include/guichan/selectionevent.hpp4
-rw-r--r--src/guild.cpp2
-rw-r--r--src/guild.h4
-rw-r--r--src/guildmanager.h4
-rw-r--r--src/imagesprite.h2
-rw-r--r--src/inputevent.h4
-rw-r--r--src/inputmanager.cpp2
-rw-r--r--src/inputmanager.h6
-rw-r--r--src/inventory.cpp2
-rw-r--r--src/inventory.h2
-rw-r--r--src/itemshortcut.h4
-rw-r--r--src/joystick.h2
-rw-r--r--src/keyboardconfig.h2
-rw-r--r--src/keydata.h2
-rw-r--r--src/keyevent.h2
-rw-r--r--src/keyinput.h2
-rw-r--r--src/localconsts.h2
-rw-r--r--src/localplayer.h7
-rw-r--r--src/logger.h4
-rw-r--r--src/map.cpp4
-rw-r--r--src/map.h6
-rw-r--r--src/maplayer.h14
-rw-r--r--src/mumblemanager.h4
-rw-r--r--src/normalopenglgraphics.h2
-rw-r--r--src/particlecontainer.h4
-rw-r--r--src/particleemitter.h2
-rw-r--r--src/particleemitterprop.h4
-rw-r--r--src/party.cpp2
-rw-r--r--src/party.h4
-rw-r--r--src/playerinfo.cpp2
-rw-r--r--src/playerinfo.h4
-rw-r--r--src/playerrelations.cpp12
-rw-r--r--src/playerrelations.h6
-rw-r--r--src/position.h4
-rw-r--r--src/rotationalparticle.h2
-rw-r--r--src/safeopenglgraphics.h2
-rw-r--r--src/shopitem.h4
-rw-r--r--src/simpleanimation.h4
-rw-r--r--src/sound.h4
-rw-r--r--src/spellmanager.h2
-rw-r--r--src/spellshortcut.h2
-rw-r--r--src/statuseffect.h2
-rw-r--r--src/text.h2
-rw-r--r--src/textcommand.h4
-rw-r--r--src/textmanager.h4
-rw-r--r--src/textparticle.h2
-rw-r--r--src/textrenderer.h2
-rw-r--r--src/tileset.h2
-rw-r--r--src/units.cpp4
-rw-r--r--src/units.h4
-rw-r--r--src/utils/sha256.cpp2
-rw-r--r--src/variabledata.h10
-rw-r--r--src/vector.h4
229 files changed, 462 insertions, 381 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 957661f8c..bb612c674 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -158,7 +158,7 @@ void ActorSprite::setTargetType(const TargetCursorType type)
mUsedTargetCursor = targetCursor[type][getTargetCursorSize()];
}
-struct EffectDescription
+struct EffectDescription final
{
std::string mGFXEffect;
std::string mSFXEffect;
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index a50e328d1..ae644c3cd 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -51,7 +51,7 @@
#define for_actors for (ActorSpritesConstIterator it = mActors.begin(), \
it_end = mActors.end() ; it != it_end; ++it)
-class FindBeingFunctor
+class FindBeingFunctor final
{
public:
bool operator() (const ActorSprite *const actor) const
@@ -77,7 +77,7 @@ class FindBeingFunctor
ActorSprite::Type type;
} beingFinder;
-class FindBeingEqualFunctor
+class FindBeingEqualFunctor final
{
public:
bool operator() (const Being *const being) const
@@ -90,7 +90,7 @@ class FindBeingEqualFunctor
Being *findBeing;
} beingEqualFinder;
-class SortBeingFunctor
+class SortBeingFunctor final
{
public:
bool operator() (const Being *const being1,
diff --git a/src/actorspritemanager.h b/src/actorspritemanager.h
index cc73fe6de..9a3c0db70 100644
--- a/src/actorspritemanager.h
+++ b/src/actorspritemanager.h
@@ -33,7 +33,7 @@ typedef std::set<ActorSprite*> ActorSprites;
typedef ActorSprites::iterator ActorSpritesIterator;
typedef ActorSprites::const_iterator ActorSpritesConstIterator;
-class ActorSpriteManager: public ConfigListener
+class ActorSpriteManager final: public ConfigListener
{
public:
ActorSpriteManager();
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index 394329d18..f5956cfd2 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -35,7 +35,7 @@ struct Frame;
/**
* Animates a sprite by adding playback state.
*/
-class AnimatedSprite : public Sprite
+class AnimatedSprite final : public Sprite
{
public:
/**
diff --git a/src/animationdelayload.h b/src/animationdelayload.h
index 91dffe4f3..2d24e4a99 100644
--- a/src/animationdelayload.h
+++ b/src/animationdelayload.h
@@ -23,9 +23,11 @@
#include <string>
+#include "localconsts.h"
+
class AnimatedSprite;
-class AnimationDelayLoad
+class AnimationDelayLoad final
{
public:
AnimationDelayLoad(const std::string &fileName,
diff --git a/src/animationparticle.h b/src/animationparticle.h
index b284e9fa4..d6cd42b74 100644
--- a/src/animationparticle.h
+++ b/src/animationparticle.h
@@ -31,7 +31,7 @@ class Animation;
class Map;
class SimpleAnimation;
-class AnimationParticle : public ImageParticle
+class AnimationParticle final : public ImageParticle
{
public:
AnimationParticle(Map *const map, Animation *const animation);
diff --git a/src/auctionmanager.h b/src/auctionmanager.h
index a98e36a9c..b43a3914b 100644
--- a/src/auctionmanager.h
+++ b/src/auctionmanager.h
@@ -27,7 +27,9 @@
#include <string>
#include <vector>
-class AuctionManager
+#include "localconsts.h"
+
+class AuctionManager final
{
public:
AuctionManager();
diff --git a/src/being.cpp b/src/being.cpp
index 248b70b80..465ee42dd 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -69,7 +69,7 @@
const unsigned int CACHE_SIZE = 50;
-class BeingCacheEntry
+class BeingCacheEntry final
{
public:
BeingCacheEntry(const int id):
diff --git a/src/being.h b/src/being.h
index d76a70585..95e2ab196 100644
--- a/src/being.h
+++ b/src/being.h
@@ -71,7 +71,7 @@ enum Gender
};
-class BeingEquipBackend : public Equipment::Backend
+class BeingEquipBackend final : public Equipment::Backend
{
public:
BeingEquipBackend(Being *const being);
diff --git a/src/channel.h b/src/channel.h
index 7d00beb48..5041e0735 100644
--- a/src/channel.h
+++ b/src/channel.h
@@ -25,9 +25,11 @@
#include <string>
+#include "localconsts.h"
+
class ChannelTab;
-class Channel
+class Channel final
{
public:
/**
diff --git a/src/channelmanager.h b/src/channelmanager.h
index 77b2f7476..3a0f33301 100644
--- a/src/channelmanager.h
+++ b/src/channelmanager.h
@@ -26,9 +26,11 @@
#include <list>
#include <string>
+#include "localconsts.h"
+
class Channel;
-class ChannelManager
+class ChannelManager final
{
public:
ChannelManager();
diff --git a/src/chatlogger.h b/src/chatlogger.h
index 948752aa0..a2a344800 100644
--- a/src/chatlogger.h
+++ b/src/chatlogger.h
@@ -26,7 +26,9 @@
#include <fstream>
#include <list>
-class ChatLogger
+#include "localconsts.h"
+
+class ChatLogger final
{
public:
/**
diff --git a/src/client.cpp b/src/client.cpp
index c5369127b..d034df76e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -227,7 +227,7 @@ int get_elapsed_time1(const int startTime)
namespace
{
-class AccountListener : public gcn::ActionListener
+class AccountListener final : public gcn::ActionListener
{
public:
void action(const gcn::ActionEvent &)
@@ -236,7 +236,7 @@ class AccountListener : public gcn::ActionListener
}
} accountListener;
-class LoginListener : public gcn::ActionListener
+class LoginListener final : public gcn::ActionListener
{
public:
void action(const gcn::ActionEvent &)
diff --git a/src/client.h b/src/client.h
index 3153ee821..3e1755859 100644
--- a/src/client.h
+++ b/src/client.h
@@ -153,7 +153,7 @@ struct PacketLimit
* The core part of the client. This class initializes all subsystems, runs
* the event loop, and shuts everything down again.
*/
-class Client : public ConfigListener, public gcn::ActionListener
+class Client final : public ConfigListener, public gcn::ActionListener
{
public:
/**
diff --git a/src/commandhandler.h b/src/commandhandler.h
index 3a6510661..980c39b5c 100644
--- a/src/commandhandler.h
+++ b/src/commandhandler.h
@@ -37,7 +37,7 @@ extern ChatTab *localChatTab;
/**
* A class to parse and handle user commands
*/
-class CommandHandler
+class CommandHandler final
{
public:
/**
diff --git a/src/compoundsprite.h b/src/compoundsprite.h
index 928a2a08b..4db2adbfb 100644
--- a/src/compoundsprite.h
+++ b/src/compoundsprite.h
@@ -31,7 +31,7 @@ class Image;
typedef std::list <void*> VectorPointers;
-class CompoundItem
+class CompoundItem final
{
public:
CompoundItem();
diff --git a/src/configuration.h b/src/configuration.h
index 96f45c2b7..5a843e468 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -222,7 +222,7 @@ class ConfigurationObject
*
* \ingroup CORE
*/
-class Configuration : public ConfigurationObject
+class Configuration final : public ConfigurationObject
{
public:
Configuration();
diff --git a/src/depricatedevent.h b/src/depricatedevent.h
index 07e1466d5..7c2ebed79 100644
--- a/src/depricatedevent.h
+++ b/src/depricatedevent.h
@@ -26,6 +26,8 @@
#include <set>
#include <string>
+#include "localconsts.h"
+
enum Channels
{
CHANNEL_ACTORSPRITE = 0,
@@ -115,7 +117,7 @@ DepricatedEvent event(EVENT_SERVERNOTICE); \
event.setString("message", message); \
DepricatedEvent::trigger(CHANNEL_NOTICES, event); }
-class DepricatedEvent
+class DepricatedEvent final
{
public:
// String passed can be retivered with getName()
diff --git a/src/dropshortcut.h b/src/dropshortcut.h
index 4f88e8b1b..8294163d6 100644
--- a/src/dropshortcut.h
+++ b/src/dropshortcut.h
@@ -23,6 +23,8 @@
#ifndef DROPSHORTCUT_H
#define DROPSHORTCUT_H
+#include "localconsts.h"
+
static const int DROP_SHORTCUT_ITEMS = 16;
class Item;
@@ -30,7 +32,7 @@ class Item;
/**
* The class which keeps track of the item shortcuts.
*/
-class DropShortcut
+class DropShortcut final
{
public:
/**
diff --git a/src/effectmanager.h b/src/effectmanager.h
index 4c79b3e40..190f1d0ce 100644
--- a/src/effectmanager.h
+++ b/src/effectmanager.h
@@ -27,9 +27,11 @@
#include <string>
#include <vector>
+#include "localconsts.h"
+
class Being;
-class EffectManager
+class EffectManager final
{
public:
struct EffectDescription
diff --git a/src/emoteshortcut.h b/src/emoteshortcut.h
index e9c52827c..cbef84cd0 100644
--- a/src/emoteshortcut.h
+++ b/src/emoteshortcut.h
@@ -22,12 +22,14 @@
#ifndef EMOTESHORTCUT_H
#define EMOTESHORTCUT_H
+#include "localconsts.h"
+
static const int SHORTCUT_EMOTES = 48;
/**
* The class which keeps track of the emote shortcuts.
*/
-class EmoteShortcut
+class EmoteShortcut final
{
public:
/**
diff --git a/src/flooritem.h b/src/flooritem.h
index 42a543aea..a478c623b 100644
--- a/src/flooritem.h
+++ b/src/flooritem.h
@@ -30,7 +30,7 @@ class ItemInfo;
/**
* An item lying on the floor.
*/
-class FloorItem : public ActorSprite
+class FloorItem final : public ActorSprite
{
public:
/**
diff --git a/src/game.h b/src/game.h
index 874149758..e88fb60fa 100644
--- a/src/game.h
+++ b/src/game.h
@@ -48,7 +48,7 @@ struct LastKey
* The main class responsible for running the game. The game starts after you
* have selected your character.
*/
-class Game
+class Game final
{
public:
/**
diff --git a/src/graphics.h b/src/graphics.h
index 51f0a708a..d0d2dcba9 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -52,7 +52,7 @@ static const int defaultScreenHeight = 600;
* Sections 0, 2, 6 and 8 will remain as is. 1, 3, 4, 5 and 7 will be
* repeated to fit the size of the widget.
*/
-class ImageRect
+class ImageRect final
{
public:
enum ImagePosition
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index 0afdada1e..8799d681e 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -24,11 +24,13 @@
#include <set>
#include <string>
+#include "localconsts.h"
+
class Graphics;
struct FBOInfo;
-class GraphicsManager
+class GraphicsManager final
{
public:
GraphicsManager();
diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h
index b5140aa52..e13623650 100644
--- a/src/graphicsvertexes.h
+++ b/src/graphicsvertexes.h
@@ -43,13 +43,13 @@
#include <list>
#include <vector>
-struct DoubleRect
+struct DoubleRect final
{
SDL_Rect src;
SDL_Rect dst;
};
-class SDLGraphicsVertexes
+class SDLGraphicsVertexes final
{
public:
SDLGraphicsVertexes();
@@ -60,11 +60,11 @@ class SDLGraphicsVertexes
};
#ifdef USE_OPENGL
-class SafeOpenGLGraphicsVertexes
+class SafeOpenGLGraphicsVertexes final
{
};
-class NormalOpenGLGraphicsVertexes
+class NormalOpenGLGraphicsVertexes final
{
public:
NormalOpenGLGraphicsVertexes();
@@ -117,7 +117,7 @@ class NormalOpenGLGraphicsVertexes
typedef std::vector<DoubleRect*> DoubleRects;
-class ImageVertexes
+class ImageVertexes final
{
public:
ImageVertexes();
@@ -132,7 +132,7 @@ class ImageVertexes
#endif
};
-class GraphicsVertexes
+class GraphicsVertexes final
{
public:
GraphicsVertexes();
diff --git a/src/gui/beingpopup.h b/src/gui/beingpopup.h
index f58921cf2..a1f5c0cbd 100644
--- a/src/gui/beingpopup.h
+++ b/src/gui/beingpopup.h
@@ -30,7 +30,7 @@ class Label;
/**
* A popup that displays information about a being.
*/
-class BeingPopup : public Popup
+class BeingPopup final : public Popup
{
public:
/**
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp
index 7a4aa99e6..c01925c05 100644
--- a/src/gui/botcheckerwindow.cpp
+++ b/src/gui/botcheckerwindow.cpp
@@ -58,7 +58,7 @@ const int TIME_COLUMN_WIDTH = 70;
#define WIDGET_AT(row, column) (((row) * COLUMNS_NR) + column)
-class UsersTableModel : public TableModel
+class UsersTableModel final : public TableModel
{
public:
UsersTableModel() :
diff --git a/src/gui/botcheckerwindow.h b/src/gui/botcheckerwindow.h
index 705ddd73c..5e6641161 100644
--- a/src/gui/botcheckerwindow.h
+++ b/src/gui/botcheckerwindow.h
@@ -31,7 +31,7 @@
#include <vector>
-struct BOTCHK
+struct BOTCHK final
{
short id; /**< Index into "botchecker_db" array */
short lv, sp;
@@ -47,8 +47,9 @@ namespace gcn
class Button;
}
-class BotCheckerWindow : public Window, public gcn::ActionListener,
- public ConfigListener
+class BotCheckerWindow final : public Window,
+ public gcn::ActionListener,
+ public ConfigListener
{
public:
friend class UsersTableModel;
diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h
index 50d8a4d0b..91badb30d 100644
--- a/src/gui/buydialog.h
+++ b/src/gui/buydialog.h
@@ -46,8 +46,8 @@ namespace gcn
*
* \ingroup Interface
*/
-class BuyDialog : public Window, public gcn::ActionListener,
- public gcn::SelectionListener
+class BuyDialog final : public Window, public gcn::ActionListener,
+ public gcn::SelectionListener
{
public:
/**
diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h
index dfc59415e..d6fc3daa1 100644
--- a/src/gui/buyselldialog.h
+++ b/src/gui/buyselldialog.h
@@ -37,7 +37,7 @@ namespace gcn
*
* \ingroup Interface
*/
-class BuySellDialog : public Window, public gcn::ActionListener
+class BuySellDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index 6077a3d93..0db1d52df 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -42,7 +42,7 @@ namespace gcn
*
* \ingroup Interface
*/
-class ChangeEmailDialog : public Window, public gcn::ActionListener
+class ChangeEmailDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index e6cb18c7e..348311e48 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -42,7 +42,7 @@ namespace gcn
*
* \ingroup Interface
*/
-class ChangePasswordDialog : public Window, public gcn::ActionListener
+class ChangePasswordDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index 83521e301..6e087d9a7 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -46,9 +46,9 @@ namespace gcn
*
* \ingroup Interface
*/
-class CharCreateDialog : public Window,
- public gcn::ActionListener,
- public gcn::KeyListener
+class CharCreateDialog final : public Window,
+ public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
/**
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index e2f8f652c..3307f9b76 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -66,7 +66,7 @@ static const int SLOTS_PER_ROW = 5;
/**
* Listener for confirming character deletion.
*/
-class CharDeleteConfirm : public ConfirmDialog
+class CharDeleteConfirm final : public ConfirmDialog
{
public:
CharDeleteConfirm(CharSelectDialog *const m, const int index) :
@@ -91,7 +91,7 @@ class CharDeleteConfirm : public ConfirmDialog
int mIndex;
};
-class CharacterDisplay : public Container
+class CharacterDisplay final : public Container
{
public:
CharacterDisplay(CharSelectDialog *const charSelectDialog);
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 398909f8a..a76507f98 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -55,9 +55,9 @@ namespace Net
*
* \ingroup Interface
*/
-class CharSelectDialog : public Window,
- public gcn::ActionListener,
- public gcn::KeyListener
+class CharSelectDialog final : public Window,
+ public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
friend class CharDeleteConfirm;
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index fdc6169ed..4897a06bd 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -73,7 +73,7 @@
/**
* The chat input hides when it loses focus. It is also invisible by default.
*/
-class ChatInput : public TextField, public gcn::FocusListener
+class ChatInput final : public TextField, public gcn::FocusListener
{
public:
ChatInput(ChatWindow *const window, TabbedArea *const tabs):
@@ -131,7 +131,7 @@ const char *COLOR_NAME[14] =
};
-class ColorListModel : public gcn::ListModel
+class ColorListModel final : public gcn::ListModel
{
public:
virtual ~ColorListModel()
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index 4d4b249e6..db3d496c3 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -72,7 +72,7 @@ enum Own
};
/** One item in the chat log */
-struct CHATLOG
+struct CHATLOG final
{
std::string nick;
std::string text;
@@ -84,11 +84,11 @@ struct CHATLOG
*
* \ingroup Interface
*/
-class ChatWindow : public Window,
- public gcn::ActionListener,
- public gcn::KeyListener,
- public Listener,
- public ConfigListener
+class ChatWindow final : public Window,
+ public gcn::ActionListener,
+ public gcn::KeyListener,
+ public Listener,
+ public ConfigListener
{
public:
/**
diff --git a/src/gui/connectiondialog.h b/src/gui/connectiondialog.h
index df836feab..56923bb7d 100644
--- a/src/gui/connectiondialog.h
+++ b/src/gui/connectiondialog.h
@@ -34,7 +34,7 @@
*
* \ingroup Interface
*/
-class ConnectionDialog : public Window, private gcn::ActionListener
+class ConnectionDialog final : public Window, private gcn::ActionListener
{
public:
/**
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index 1a35e890b..4eca9ffae 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -49,7 +49,7 @@ class DebugTab : public Container
private:
};
-class MapDebugTab : public DebugTab
+class MapDebugTab final : public DebugTab
{
friend class DebugWindow;
@@ -73,7 +73,7 @@ class MapDebugTab : public DebugTab
std::string mFPSText;
};
-class TargetDebugTab : public DebugTab
+class TargetDebugTab final : public DebugTab
{
friend class DebugWindow;
@@ -95,7 +95,7 @@ class TargetDebugTab : public DebugTab
Label *mCriticalHitLabel;
};
-class NetDebugTab : public DebugTab
+class NetDebugTab final : public DebugTab
{
friend class DebugWindow;
@@ -115,7 +115,7 @@ class NetDebugTab : public DebugTab
*
* \ingroup Interface
*/
-class DebugWindow : public Window
+class DebugWindow final : public Window
{
public:
/**
diff --git a/src/gui/didyouknowwindow.h b/src/gui/didyouknowwindow.h
index d4452fcd2..737203298 100644
--- a/src/gui/didyouknowwindow.h
+++ b/src/gui/didyouknowwindow.h
@@ -41,8 +41,9 @@ namespace gcn
/**
* The help dialog.
*/
-class DidYouKnowWindow : public Window, public LinkHandler,
- public gcn::ActionListener
+class DidYouKnowWindow final : public Window,
+ public LinkHandler,
+ public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/editdialog.h b/src/gui/editdialog.h
index 0e7283b3e..94e7aabbf 100644
--- a/src/gui/editdialog.h
+++ b/src/gui/editdialog.h
@@ -39,7 +39,7 @@ class TextField;
*
* \ingroup GUI
*/
-class EditDialog : public Window, public gcn::ActionListener
+class EditDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h
index d66a7b3b7..63631ffef 100644
--- a/src/gui/editserverdialog.h
+++ b/src/gui/editserverdialog.h
@@ -76,9 +76,9 @@ class TypeListModel : public gcn::ListModel
*
* \ingroup Interface
*/
-class EditServerDialog : public Window,
- public gcn::ActionListener,
- public gcn::KeyListener
+class EditServerDialog final : public Window,
+ public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
EditServerDialog(ServerDialog *const parent, ServerInfo server,
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index a2f87ca3c..ba94006c9 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -49,7 +49,7 @@ namespace gcn
class Button;
}
-struct EquipmentBox
+struct EquipmentBox final
{
EquipmentBox(const int x0, const int y0, Image *const img) :
x(x0), y(y0), image(img)
@@ -65,7 +65,7 @@ struct EquipmentBox
*
* \ingroup Interface
*/
-class EquipmentWindow : public Window, public gcn::ActionListener
+class EquipmentWindow final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h
index 064f04697..a2c565ff6 100644
--- a/src/gui/focushandler.h
+++ b/src/gui/focushandler.h
@@ -27,12 +27,14 @@
#include <list>
+#include "localconsts.h"
+
/**
* The focus handler. This focus handler does exactly the same as the Guichan
* focus handler, but keeps a stack of modal widgets to be able to handle
* multiple modal focus requests.
*/
-class FocusHandler : public gcn::FocusHandler
+class FocusHandler final : public gcn::FocusHandler
{
public:
/**
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 237c867bf..c502ce04a 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -55,7 +55,7 @@ SDLInput *guiInput = nullptr;
// Bolded font
SDLFont *boldFont = nullptr;
-class GuiConfigListener : public ConfigListener
+class GuiConfigListener final : public ConfigListener
{
public:
GuiConfigListener(Gui *const g):
diff --git a/src/gui/gui.h b/src/gui/gui.h
index d293e3015..ee1cb9092 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -44,7 +44,7 @@ class SDLInput;
*
* \ingroup GUI
*/
-class Gui : public gcn::Gui
+class Gui final : public gcn::Gui
{
public:
/**
diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h
index 9d89c03c4..677079964 100644
--- a/src/gui/helpwindow.h
+++ b/src/gui/helpwindow.h
@@ -46,10 +46,10 @@ typedef HelpNames::const_iterator HelpNamesCIter;
typedef std::map<std::string, HelpNames> HelpTagsMap;
/**
- * The help dialog.
+ * The help window.
*/
-class HelpWindow : public Window, public LinkHandler,
- public gcn::ActionListener
+class HelpWindow final : public Window, public LinkHandler,
+ public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index e0538224a..6faa4e5d1 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -69,7 +69,7 @@ const char *SORT_NAME[6] =
N_("by type")
};
-class SortListModel : public gcn::ListModel
+class SortListModel final : public gcn::ListModel
{
public:
virtual ~SortListModel()
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 2f8261228..f06ee487e 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -55,12 +55,12 @@ namespace gcn
*
* \ingroup Interface
*/
-class InventoryWindow : public Window,
- public gcn::ActionListener,
- public gcn::KeyListener,
- public gcn::SelectionListener,
- public InventoryListener,
- public Listener
+class InventoryWindow final : public Window,
+ public gcn::ActionListener,
+ public gcn::KeyListener,
+ public gcn::SelectionListener,
+ public InventoryListener,
+ public Listener
{
public:
/**
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp
index 98fe9582a..02bddbc11 100644
--- a/src/gui/itemamountwindow.cpp
+++ b/src/gui/itemamountwindow.cpp
@@ -47,7 +47,7 @@
#include "debug.h"
-class ItemsModal : public gcn::ListModel
+class ItemsModal final : public gcn::ListModel
{
public:
ItemsModal()
diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h
index c06d9a618..fd3ef3ab0 100644
--- a/src/gui/itemamountwindow.h
+++ b/src/gui/itemamountwindow.h
@@ -46,9 +46,9 @@ namespace gcn
*
* \ingroup Interface
*/
-class ItemAmountWindow : public Window,
- public gcn::ActionListener,
- public gcn::KeyListener
+class ItemAmountWindow final : public Window,
+ public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
enum Usage
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index dd2bae83d..0bdfcfeb5 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -44,7 +44,7 @@ namespace gcn
/**
* A popup that displays information about an item.
*/
-class ItemPopup : public Popup
+class ItemPopup final : public Popup
{
public:
/**
diff --git a/src/gui/killstats.h b/src/gui/killstats.h
index 6587ca462..1db3a4943 100644
--- a/src/gui/killstats.h
+++ b/src/gui/killstats.h
@@ -37,7 +37,9 @@ namespace gcn
class Label;
}
-class KillStats : public Window, private gcn::ActionListener, public Listener
+class KillStats final : public Window,
+ private gcn::ActionListener,
+ public Listener
{
public:
/**
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index 4f0325a1d..d70e8e4df 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -57,7 +57,7 @@ const char *UPDATE_TYPE_TEXT[3] =
N_("Skip"),
};
-class UpdateTypeModel : public gcn::ListModel
+class UpdateTypeModel final : public gcn::ListModel
{
public:
virtual ~UpdateTypeModel()
@@ -77,7 +77,7 @@ public:
}
};
-class UpdateListModel : public gcn::ListModel
+class UpdateListModel final : public gcn::ListModel
{
public:
UpdateListModel(LoginData *const data) :
diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h
index e2c882ee4..9b6ace887 100644
--- a/src/gui/logindialog.h
+++ b/src/gui/logindialog.h
@@ -50,8 +50,8 @@ namespace gcn
*
* \ingroup Interface
*/
-class LoginDialog : public Window, public gcn::ActionListener,
- public gcn::KeyListener
+class LoginDialog final : public Window, public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
/**
diff --git a/src/gui/minimap.h b/src/gui/minimap.h
index ee5a63f6a..95b29ad89 100644
--- a/src/gui/minimap.h
+++ b/src/gui/minimap.h
@@ -38,7 +38,7 @@ class TextPopup;
*
* \ingroup Interface
*/
-class Minimap : public Window
+class Minimap final : public Window
{
public:
Minimap();
diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h
index cba3c3c4c..bfb14c2b8 100644
--- a/src/gui/ministatuswindow.h
+++ b/src/gui/ministatuswindow.h
@@ -41,9 +41,9 @@ class TextPopup;
*
* \ingroup Interface
*/
-class MiniStatusWindow : public Popup,
- public InventoryListener,
- public Listener
+class MiniStatusWindow final : public Popup,
+ public InventoryListener,
+ public Listener
{
public:
MiniStatusWindow();
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index 02479c4b1..6437311b4 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -55,8 +55,8 @@ namespace gcn
*
* \ingroup Interface
*/
-class NpcDialog : public Window, public gcn::ActionListener,
- public ExtendedListModel, public ConfigListener
+class NpcDialog final : public Window, public gcn::ActionListener,
+ public ExtendedListModel, public ConfigListener
{
public:
/**
diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h
index af5e735a2..96b51fb47 100644
--- a/src/gui/npcpostdialog.h
+++ b/src/gui/npcpostdialog.h
@@ -30,7 +30,7 @@
class TextBox;
class TextField;
-class NpcPostDialog : public Window, public gcn::ActionListener
+class NpcPostDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/okdialog.h b/src/gui/okdialog.h
index 676fe4a80..2d2fefee4 100644
--- a/src/gui/okdialog.h
+++ b/src/gui/okdialog.h
@@ -43,7 +43,7 @@ enum
*
* \ingroup GUI
*/
-class OkDialog : public Window, public gcn::ActionListener
+class OkDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h
index 7ab15c7c1..a72bf332a 100644
--- a/src/gui/outfitwindow.h
+++ b/src/gui/outfitwindow.h
@@ -42,7 +42,7 @@ class CheckBox;
class Item;
class Label;
-class OutfitWindow : public Window, private gcn::ActionListener
+class OutfitWindow final : public Window, private gcn::ActionListener
{
public:
/**
diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h
index 550fa28b0..3ce363a34 100644
--- a/src/gui/popupmenu.h
+++ b/src/gui/popupmenu.h
@@ -45,7 +45,7 @@ class TextDialog;
class ProgressBar;
class Window;
-class RenameListener : public gcn::ActionListener
+class RenameListener final : public gcn::ActionListener
{
public:
RenameListener();
@@ -88,7 +88,7 @@ class PlayerListener : public gcn::ActionListener
/**
* Window showing popup menu.
*/
-class PopupMenu : public Popup, public LinkHandler
+class PopupMenu final : public Popup, public LinkHandler
{
public:
/**
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index 092fdc6c3..66a7d50cf 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -45,7 +45,7 @@
#include "debug.h"
-struct QuestItemText
+struct QuestItemText final
{
QuestItemText(std::string text0, const int type0) :
text(text0), type(type0)
@@ -56,7 +56,7 @@ struct QuestItemText
int type;
};
-struct QuestItem
+struct QuestItem final
{
QuestItem() :
var(0), completeFlag(-1)
@@ -72,7 +72,7 @@ struct QuestItem
int completeFlag;
};
-class QuestsModel : public ExtendedNamesModel
+class QuestsModel final : public ExtendedNamesModel
{
public:
QuestsModel() :
diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h
index 30815d751..017dd43c3 100644
--- a/src/gui/questswindow.h
+++ b/src/gui/questswindow.h
@@ -41,7 +41,7 @@ class QuestsModel;
struct QuestItem;
-class QuestsWindow : public Window, public gcn::ActionListener
+class QuestsWindow final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 5a4134d3a..4c26ee90e 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -41,8 +41,8 @@ namespace gcn
*
* \ingroup Interface
*/
-class QuitDialog : public Window, public gcn::ActionListener,
- public gcn::KeyListener
+class QuitDialog final : public Window, public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
/**
diff --git a/src/gui/registerdialog.h b/src/gui/registerdialog.h
index 138695177..6117da102 100644
--- a/src/gui/registerdialog.h
+++ b/src/gui/registerdialog.h
@@ -45,7 +45,7 @@ namespace gcn
* to the field which contained wrong data when the Ok button was pressed on
* the error notice.
*/
-class WrongDataNoticeListener : public gcn::ActionListener
+class WrongDataNoticeListener final : public gcn::ActionListener
{
public:
WrongDataNoticeListener();
@@ -60,8 +60,8 @@ class WrongDataNoticeListener : public gcn::ActionListener
*
* \ingroup Interface
*/
-class RegisterDialog : public Window, public gcn::ActionListener,
- public gcn::KeyListener
+class RegisterDialog final : public Window, public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
/**
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index 5422a4c67..33581767d 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -45,7 +45,7 @@ const unsigned int CLEAN_TIME = 5;
char *strBuf;
-class SDLTextChunk
+class SDLTextChunk final
{
public:
SDLTextChunk(const std::string &text0, const gcn::Color &color0) :
diff --git a/src/gui/sdlfont.h b/src/gui/sdlfont.h
index a736c70e0..5d94d5f82 100644
--- a/src/gui/sdlfont.h
+++ b/src/gui/sdlfont.h
@@ -35,6 +35,8 @@
#include <list>
#include <string>
+#include "localconsts.h"
+
const unsigned int CACHES_NUMBER = 256;
class SDLTextChunk;
@@ -44,7 +46,7 @@ class SDLTextChunk;
*
* <b>NOTE:</b> This class initializes SDL_ttf as necessary.
*/
-class SDLFont : public gcn::Font
+class SDLFont final : public gcn::Font
{
public:
/**
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h
index 534f0573e..2bedad3e0 100644
--- a/src/gui/sdlinput.h
+++ b/src/gui/sdlinput.h
@@ -127,7 +127,7 @@ namespace Key
/**
* SDL implementation of Input.
*/
-class SDLInput : public gcn::Input
+class SDLInput final : public gcn::Input
{
public:
diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h
index 5c1e7300d..1fe5e234f 100644
--- a/src/gui/selldialog.h
+++ b/src/gui/selldialog.h
@@ -47,9 +47,9 @@ namespace gcn
*
* \ingroup Interface
*/
-class SellDialog : public Window,
- private gcn::ActionListener,
- private gcn::SelectionListener
+class SellDialog final : public Window,
+ private gcn::ActionListener,
+ private gcn::SelectionListener
{
public:
/**
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 472d01223..408c1c3e2 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -154,7 +154,7 @@ void ServersListModel::setVersionString(const int index,
}
}
-class ServersListBox : public ListBox
+class ServersListBox final : public ListBox
{
public:
ServersListBox(ServersListModel *const model) :
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index 741005a07..1c6e850cb 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -50,7 +50,7 @@ class DropDown;
/**
* Server and Port List Model
*/
-class ServersListModel : public gcn::ListModel
+class ServersListModel final : public gcn::ListModel
{
public:
typedef std::pair<int, std::string> VersionString;
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 71b9594b6..5687e8c7e 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -46,7 +46,7 @@ class SetupTab;
*
* \ingroup GUI
*/
-class Setup : public Window, public gcn::ActionListener
+class Setup final : public Window, public gcn::ActionListener
{
public:
Setup();
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp
index 27fceee92..1faeca28a 100644
--- a/src/gui/setup_audio.cpp
+++ b/src/gui/setup_audio.cpp
@@ -36,7 +36,7 @@
#include "debug.h"
-class SoundsModel : public NamesModel
+class SoundsModel final : public NamesModel
{
public:
SoundsModel() :
diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h
index 65bce0c14..8019f2ea2 100644
--- a/src/gui/setup_audio.h
+++ b/src/gui/setup_audio.h
@@ -29,7 +29,7 @@
#include <guichan/actionlistener.hpp>
-class Setup_Audio : public SetupTabScroll
+class Setup_Audio final : public SetupTabScroll
{
public:
Setup_Audio();
diff --git a/src/gui/setup_chat.h b/src/gui/setup_chat.h
index ad3783fa1..a14b05cd4 100644
--- a/src/gui/setup_chat.h
+++ b/src/gui/setup_chat.h
@@ -30,7 +30,7 @@
class IntTextField;
class EditDialog;
-class Setup_Chat : public SetupTabScroll
+class Setup_Chat final : public SetupTabScroll
{
public:
Setup_Chat();
diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h
index 534ba5e86..3f30d8d4c 100644
--- a/src/gui/setup_colors.h
+++ b/src/gui/setup_colors.h
@@ -41,8 +41,8 @@ namespace gcn
class Slider;
}
-class Setup_Colors : public SetupTab,
- public gcn::SelectionListener
+class Setup_Colors final : public SetupTab,
+ public gcn::SelectionListener
{
public:
Setup_Colors();
diff --git a/src/gui/setup_input.cpp b/src/gui/setup_input.cpp
index 82480e0e0..68a14f557 100644
--- a/src/gui/setup_input.cpp
+++ b/src/gui/setup_input.cpp
@@ -50,7 +50,7 @@ const int setupGroups = 9;
*
* \ingroup Interface
*/
-class KeyListModel : public gcn::ListModel
+class KeyListModel final : public gcn::ListModel
{
public:
KeyListModel() :
diff --git a/src/gui/setup_input.h b/src/gui/setup_input.h
index f3e2f7113..2346cc67d 100644
--- a/src/gui/setup_input.h
+++ b/src/gui/setup_input.h
@@ -36,7 +36,7 @@
class TabStrip;
struct SetupActionData;
-class Setup_Input : public SetupTab
+class Setup_Input final : public SetupTab
{
public:
/**
diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h
index 35a21080a..63d9e7880 100644
--- a/src/gui/setup_joystick.h
+++ b/src/gui/setup_joystick.h
@@ -37,7 +37,7 @@ namespace gcn
class Label;
}
-class Setup_Joystick : public SetupTab
+class Setup_Joystick final : public SetupTab
{
public:
Setup_Joystick();
diff --git a/src/gui/setup_other.h b/src/gui/setup_other.h
index 3b424479b..22281022a 100644
--- a/src/gui/setup_other.h
+++ b/src/gui/setup_other.h
@@ -30,7 +30,7 @@
class EditDialog;
class TextField;
-class Setup_Other : public SetupTabScroll
+class Setup_Other final : public SetupTabScroll
{
public:
Setup_Other();
diff --git a/src/gui/setup_perfomance.h b/src/gui/setup_perfomance.h
index b8e625a1a..0e03a145e 100644
--- a/src/gui/setup_perfomance.h
+++ b/src/gui/setup_perfomance.h
@@ -30,7 +30,7 @@
class IntTextField;
class EditDialog;
-class Setup_Perfomance : public SetupTabScroll
+class Setup_Perfomance final : public SetupTabScroll
{
public:
Setup_Perfomance();
diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h
index c66c0049e..c9779786f 100644
--- a/src/gui/setup_players.h
+++ b/src/gui/setup_players.h
@@ -30,7 +30,7 @@
class IntTextField;
class EditDialog;
-class Setup_Players : public SetupTabScroll
+class Setup_Players final : public SetupTabScroll
{
public:
Setup_Players();
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index 50a41e3e6..48271f6b7 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -72,7 +72,7 @@ static const char *RELATION_NAMES[PlayerRelation::RELATIONS_NR] =
N_("Enemy")
};
-class PlayerRelationListModel : public gcn::ListModel
+class PlayerRelationListModel final : public gcn::ListModel
{
public:
virtual ~PlayerRelationListModel()
@@ -91,7 +91,7 @@ public:
}
};
-class PlayerTableModel : public TableModel
+class PlayerTableModel final : public TableModel
{
public:
PlayerTableModel() :
@@ -206,7 +206,7 @@ protected:
/**
* Class for choosing one of the various `what to do when ignoring a player' options
*/
-class IgnoreChoicesListModel : public gcn::ListModel
+class IgnoreChoicesListModel final : public gcn::ListModel
{
public:
virtual ~IgnoreChoicesListModel()
diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h
index 0980371b9..d81a80a60 100644
--- a/src/gui/setup_relations.h
+++ b/src/gui/setup_relations.h
@@ -43,8 +43,8 @@ namespace gcn
class ScrollArea;
}
-class Setup_Relations : public SetupTab,
- public PlayerRelationsListener
+class Setup_Relations final : public SetupTab,
+ public PlayerRelationsListener
{
public:
Setup_Relations();
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index ddfd52291..4a8a1f296 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -52,7 +52,7 @@ const char* ACTION_HELP_FONT = "help font";
const char* ACTION_SECURE_FONT = "secure font";
const char* ACTION_JAPAN_FONT = "japan font";
-class ThemesModel : public NamesModel
+class ThemesModel final : public NamesModel
{
public:
ThemesModel() :
@@ -66,7 +66,7 @@ public:
{ }
};
-class FontsModel : public NamesModel
+class FontsModel final : public NamesModel
{
public:
FontsModel() :
@@ -94,7 +94,7 @@ const char *SIZE_NAME[maxFontSizes] =
N_("Very huge (19)"),
};
-class FontSizeChoiceListModel : public gcn::ListModel
+class FontSizeChoiceListModel final : public gcn::ListModel
{
public:
virtual ~FontSizeChoiceListModel()
@@ -112,10 +112,9 @@ public:
}
};
-struct Language
+struct Language final
{
std::string name;
-
std::string value;
};
@@ -141,7 +140,7 @@ const Language LANG_NAME[langs_count] =
{N_("Spanish (Castilian)"), "es_ES"}
};
-class LangListModel : public gcn::ListModel
+class LangListModel final : public gcn::ListModel
{
public:
virtual ~LangListModel()
diff --git a/src/gui/setup_theme.h b/src/gui/setup_theme.h
index cc8b01fbe..53f23d267 100644
--- a/src/gui/setup_theme.h
+++ b/src/gui/setup_theme.h
@@ -40,7 +40,7 @@ namespace gcn
class Label;
}
-class Setup_Theme : public SetupTab
+class Setup_Theme final : public SetupTab
{
public:
Setup_Theme();
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 3bd6ab139..5157f8e9f 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -68,7 +68,7 @@ extern Graphics *mainGraphics;
*
* \ingroup Interface
*/
-class ModeListModel : public gcn::ListModel
+class ModeListModel final : public gcn::ListModel
{
public:
/**
@@ -199,7 +199,7 @@ const char *OPENGL_NAME[3] =
N_("Safe OpenGL"),
};
-class OpenGLListModel : public gcn::ListModel
+class OpenGLListModel final : public gcn::ListModel
{
public:
virtual ~OpenGLListModel()
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 84b1084c7..fc3f61439 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -44,7 +44,7 @@ namespace gcn
class Slider;
}
-class Setup_Video : public SetupTab, public gcn::KeyListener
+class Setup_Video final : public SetupTab, public gcn::KeyListener
{
public:
Setup_Video();
diff --git a/src/gui/setup_visual.h b/src/gui/setup_visual.h
index 14c11f3b2..1daab2462 100644
--- a/src/gui/setup_visual.h
+++ b/src/gui/setup_visual.h
@@ -24,7 +24,7 @@
#include "gui/widgets/setupitem.h"
-class Setup_Visual : public SetupTabScroll
+class Setup_Visual final : public SetupTabScroll
{
public:
Setup_Visual();
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 1cf6dfeed..3fab79b61 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -35,7 +35,7 @@
int selectedData = 0;
-struct SetupActionData
+struct SetupActionData final
{
std::string name;
const int actionId;
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index fe830c52d..5faaeb8ab 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -48,11 +48,10 @@ namespace gcn
*
* \ingroup Interface
*/
-class ShopWindow : public Window, public gcn::ActionListener,
- public gcn::SelectionListener
+class ShopWindow final : public Window, public gcn::ActionListener,
+ public gcn::SelectionListener
{
public:
-
enum ShopMode
{
BUY = 0,
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index 52ac58757..846bbb497 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -38,7 +38,7 @@ static const int SCROLL_PADDING = 0;
int ShortcutWindow::mBoxesWidth = 0;
-class ShortcutTab : public Tab
+class ShortcutTab final : public Tab
{
public:
ShortcutTab(std::string name, ShortcutContainer *const content) :
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index 9d50665b4..531df51ce 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -34,7 +34,7 @@ class TabbedArea;
*
* \ingroup Interface
*/
-class ShortcutWindow : public Window
+class ShortcutWindow final : public Window
{
public:
/**
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index d25b44941..0c79d0bd6 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -60,7 +60,7 @@
class SkillModel;
class SkillEntry;
-class SkillModel : public gcn::ListModel
+class SkillModel final : public gcn::ListModel
{
public:
int getNumberOfElements()
@@ -87,7 +87,7 @@ class SkillModel : public gcn::ListModel
SkillList mVisibleSkills;
};
-class SkillListBox : public ListBox
+class SkillListBox final : public ListBox
{
public:
SkillListBox(SkillModel *const model):
@@ -184,7 +184,7 @@ class SkillListBox : public ListBox
gcn::Color mTextColor;
};
-class SkillTab : public Tab
+class SkillTab final : public Tab
{
public:
SkillTab(const std::string &name, SkillListBox *const listBox) :
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 09781d4ac..0fd961e1c 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -40,7 +40,7 @@ class SkillModel;
class Tab;
class TabbedArea;
-struct SkillInfo
+struct SkillInfo final
{
unsigned short id;
std::string name;
@@ -81,7 +81,7 @@ typedef std::vector<SkillInfo*> SkillList;
*
* \ingroup Interface
*/
-class SkillDialog : public Window, public gcn::ActionListener
+class SkillDialog final : public Window, public gcn::ActionListener
{
public:
SkillDialog();
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index c8f20edd2..549b2bcc4 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -55,7 +55,7 @@
#include "debug.h"
-class SortFriendsFunctor
+class SortFriendsFunctor final
{
public:
bool operator() (const Avatar *const m1, const Avatar *const m2) const
@@ -129,7 +129,7 @@ protected:
AvatarListBox *mList;
};
-class SocialGuildTab : public SocialTab, public gcn::ActionListener
+class SocialGuildTab final : public SocialTab, public gcn::ActionListener
{
public:
SocialGuildTab(Guild *const guild, const bool showBackground) :
@@ -233,7 +233,7 @@ private:
Guild *mGuild;
};
-class SocialGuildTab2 : public SocialTab, public gcn::ActionListener
+class SocialGuildTab2 final : public SocialTab, public gcn::ActionListener
{
public:
SocialGuildTab2(Guild *const guild, const bool showBackground) :
@@ -293,7 +293,7 @@ private:
Guild *mGuild;
};
-class SocialPartyTab : public SocialTab, public gcn::ActionListener
+class SocialPartyTab final : public SocialTab, public gcn::ActionListener
{
public:
SocialPartyTab(Party *const party, const bool showBackground) :
@@ -396,7 +396,7 @@ private:
Party *mParty;
};
-class BeingsListModal : public AvatarListModel
+class BeingsListModal final : public AvatarListModel
{
public:
BeingsListModal() :
@@ -428,7 +428,7 @@ public:
std::vector<Avatar*> mMembers;
};
-class SocialPlayersTab : public SocialTab
+class SocialPlayersTab final : public SocialTab
{
public:
SocialPlayersTab(std::string name, const bool showBackground) :
@@ -594,7 +594,7 @@ private:
};
-class SocialNavigationTab : public SocialTab
+class SocialNavigationTab final : public SocialTab
{
public:
SocialNavigationTab(const bool showBackground) :
@@ -930,7 +930,7 @@ protected:
std::list<std::string>::const_iterator i;\
std::list<std::string>::const_iterator i_end;
-class SocialAttackTab : public SocialTab
+class SocialAttackTab final : public SocialTab
{
public:
SocialAttackTab(const bool showBackground) :
@@ -986,7 +986,7 @@ private:
BeingsListModal *mBeings;
};
-class SocialPickupTab : public SocialTab
+class SocialPickupTab final : public SocialTab
{
public:
SocialPickupTab(const bool showBackground) :
@@ -1042,7 +1042,7 @@ private:
};
-class SocialFriendsTab : public SocialTab
+class SocialFriendsTab final : public SocialTab
{
public:
SocialFriendsTab(std::string name, const bool showBackground) :
@@ -1136,7 +1136,7 @@ private:
};
-class CreatePopup : public Popup, public LinkHandler
+class CreatePopup final : public Popup, public LinkHandler
{
public:
CreatePopup() :
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 0806c8d10..0287e9100 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -49,7 +49,7 @@ class PlayersTab;
*
* \ingroup Interface
*/
-class SocialWindow : public Window, private gcn::ActionListener
+class SocialWindow final : public Window, private gcn::ActionListener
{
public:
SocialWindow();
diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp
index d96ef7c85..eaeefcf78 100644
--- a/src/gui/specialswindow.cpp
+++ b/src/gui/specialswindow.cpp
@@ -53,7 +53,7 @@
static const unsigned int SPECIALS_WIDTH = 200;
static const unsigned int SPECIALS_HEIGHT = 32;
-class SpecialEntry : public Container
+class SpecialEntry final : public Container
{
public:
SpecialEntry(SpecialInfo *info);
diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h
index e2841d179..a824c4296 100644
--- a/src/gui/specialswindow.h
+++ b/src/gui/specialswindow.h
@@ -39,7 +39,7 @@ class TabbedArea;
class SpecialEntry;
-class SpecialsWindow : public Window, public gcn::ActionListener
+class SpecialsWindow final : public Window, public gcn::ActionListener
{
public:
SpecialsWindow();
diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h
index c6b512c83..2a36eaa59 100644
--- a/src/gui/speechbubble.h
+++ b/src/gui/speechbubble.h
@@ -35,7 +35,7 @@ namespace gcn
class Label;
}
-class SpeechBubble : public Popup
+class SpeechBubble final : public Popup
{
public:
/**
diff --git a/src/gui/spellpopup.h b/src/gui/spellpopup.h
index 403112e85..97266ca9e 100644
--- a/src/gui/spellpopup.h
+++ b/src/gui/spellpopup.h
@@ -40,7 +40,7 @@ namespace gcn
/**
* A popup that displays information about an item.
*/
-class SpellPopup : public Popup
+class SpellPopup final : public Popup
{
public:
/**
diff --git a/src/gui/statuspopup.h b/src/gui/statuspopup.h
index 181bc9401..99ba46792 100644
--- a/src/gui/statuspopup.h
+++ b/src/gui/statuspopup.h
@@ -42,7 +42,7 @@ namespace gcn
/**
* A popup that displays information about an item.
*/
-class StatusPopup : public Popup
+class StatusPopup final : public Popup
{
public:
/**
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 295adcd6e..10a30f1b9 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -87,7 +87,7 @@ class AttrDisplay : public Container
Label *mValue;
};
-class DerDisplay : public AttrDisplay
+class DerDisplay final : public AttrDisplay
{
public:
DerDisplay(const int id, const std::string &name);
@@ -96,7 +96,7 @@ class DerDisplay : public AttrDisplay
{ return DERIVED; }
};
-class ChangeDisplay : public AttrDisplay, gcn::ActionListener
+class ChangeDisplay final : public AttrDisplay, gcn::ActionListener
{
public:
ChangeDisplay(const int id, const std::string &name);
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h
index 94ce9b42c..0d3fefb4b 100644
--- a/src/gui/statuswindow.h
+++ b/src/gui/statuswindow.h
@@ -47,9 +47,9 @@ namespace gcn
*
* \ingroup Interface
*/
-class StatusWindow : public Window,
- public gcn::ActionListener,
- public Listener
+class StatusWindow final : public Window,
+ public gcn::ActionListener,
+ public Listener
{
public:
/**
diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp
index d58a5094e..79fcd17b4 100644
--- a/src/gui/textcommandeditor.cpp
+++ b/src/gui/textcommandeditor.cpp
@@ -51,7 +51,7 @@
#include "debug.h"
-class IconsModal : public gcn::ListModel
+class IconsModal final : public gcn::ListModel
{
public:
IconsModal()
@@ -120,7 +120,7 @@ const char *MAGIC_SCHOOL_TEXT[6] =
N_("Astral Magic")
};
-class TargetTypeModel : public gcn::ListModel
+class TargetTypeModel final : public gcn::ListModel
{
public:
virtual ~TargetTypeModel()
@@ -140,7 +140,7 @@ public:
}
};
-class MagicSchoolModel : public gcn::ListModel
+class MagicSchoolModel final : public gcn::ListModel
{
public:
virtual ~MagicSchoolModel()
diff --git a/src/gui/textcommandeditor.h b/src/gui/textcommandeditor.h
index 65274098d..616c6d627 100644
--- a/src/gui/textcommandeditor.h
+++ b/src/gui/textcommandeditor.h
@@ -42,7 +42,7 @@ class TextBox;
class TextCommand;
class TextField;
-class TextCommandEditor : public Window, public gcn::ActionListener
+class TextCommandEditor final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h
index a05dc3107..71cc88bcd 100644
--- a/src/gui/textdialog.h
+++ b/src/gui/textdialog.h
@@ -40,7 +40,7 @@ namespace gcn
*
* \ingroup GUI
*/
-class TextDialog : public Window, public gcn::ActionListener
+class TextDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h
index 5e425abca..faf61e311 100644
--- a/src/gui/textpopup.h
+++ b/src/gui/textpopup.h
@@ -38,7 +38,7 @@ namespace gcn
/**
* A popup that displays information about an item.
*/
-class TextPopup : public Popup
+class TextPopup final : public Popup
{
public:
/**
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index b6509348f..7b85c8764 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -337,7 +337,7 @@ void Theme::optionChanged(const std::string &)
updateAlpha();
}
-struct SkinParameter
+struct SkinParameter final
{
int index;
std::string name;
@@ -390,7 +390,7 @@ static const SkinParameter imageParam[] =
{3, "stickyImageDown"},
};
-struct SkinHelper
+struct SkinHelper final
{
std::string partType;
int xPos;
diff --git a/src/gui/theme.h b/src/gui/theme.h
index aeed253ed..86be2e743 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -39,7 +39,7 @@ class Image;
class ImageSet;
class ProgressBar;
-class Skin
+class Skin final
{
public:
Skin(const ImageRect &skin, const ImageRect &images,
@@ -125,7 +125,7 @@ class Skin
std::map<std::string, int> *mOptions;
};
-class Theme : public Palette, public ConfigListener
+class Theme final : public Palette, public ConfigListener
{
public:
static Theme *instance();
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h
index 3b840f045..0ba3b9043 100644
--- a/src/gui/tradewindow.h
+++ b/src/gui/tradewindow.h
@@ -47,9 +47,9 @@ namespace gcn
*
* \ingroup Interface
*/
-class TradeWindow : public Window,
- private gcn::ActionListener,
- private gcn::SelectionListener
+class TradeWindow final : public Window,
+ private gcn::ActionListener,
+ private gcn::SelectionListener
{
public:
/**
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index de783a410..e647b2bb9 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -42,7 +42,7 @@ namespace gcn
*
* \ingroup Interface
*/
-class UnRegisterDialog : public Window, public gcn::ActionListener
+class UnRegisterDialog final : public Window, public gcn::ActionListener
{
public:
/**
diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h
index c7534dece..0adadb9ec 100644
--- a/src/gui/updaterwindow.h
+++ b/src/gui/updaterwindow.h
@@ -47,7 +47,7 @@ namespace gcn
class Label;
}
-struct updateFile
+struct updateFile final
{
public:
std::string name;
@@ -62,10 +62,10 @@ struct updateFile
*
* \ingroup GUI
*/
-class UpdaterWindow : public Window,
- public gcn::ActionListener,
- public LinkHandler,
- public gcn::KeyListener
+class UpdaterWindow final : public Window,
+ public gcn::ActionListener,
+ public LinkHandler,
+ public gcn::KeyListener
{
public:
/**
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 0ce3a6b85..f14c2c10c 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -31,7 +31,7 @@
/**
* Class controlling the game's color palette.
*/
-class UserPalette : public Palette, public gcn::ListModel
+class UserPalette final : public Palette, public gcn::ListModel
{
public:
/** List of all colors that are configurable. */
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 3f80cea1c..4d4c61896 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -60,9 +60,9 @@ const int walkingMouseDelay = 500;
* of it such as NPC messages, which are positioned using map pixel
* coordinates.
*/
-class Viewport : public WindowContainer,
- public gcn::MouseListener,
- public ConfigListener
+class Viewport final : public WindowContainer,
+ public gcn::MouseListener,
+ public ConfigListener
{
public:
/**
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 747691ad3..d3fcfa451 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -63,7 +63,7 @@
#endif
-class NameFunctuator
+class NameFunctuator final
{
public:
bool operator()(const OnlinePlayer *left,
diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h
index 57778e2d4..35565930e 100644
--- a/src/gui/whoisonline.h
+++ b/src/gui/whoisonline.h
@@ -46,7 +46,7 @@ namespace gcn
class Button;
}
-class OnlinePlayer
+class OnlinePlayer final
{
public:
OnlinePlayer(const std::string &nick, const unsigned char status,
@@ -106,10 +106,10 @@ class OnlinePlayer
*
* \ingroup GUI
*/
-class WhoIsOnline : public Window,
- public LinkHandler,
- public gcn::ActionListener,
- public ConfigListener
+class WhoIsOnline final : public Window,
+ public LinkHandler,
+ public gcn::ActionListener,
+ public ConfigListener
{
public:
/**
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
index 995ffebe6..9ab56e9b0 100644
--- a/src/gui/widgets/avatarlistbox.h
+++ b/src/gui/widgets/avatarlistbox.h
@@ -43,7 +43,7 @@ public:
{ return getAvatarAt(i)->getName(); }
};
-class AvatarListBox : public ListBox, public ConfigListener
+class AvatarListBox final : public ListBox, public ConfigListener
{
public:
AvatarListBox(AvatarListModel *const model);
diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h
index 2a034a166..12ba23ebf 100644
--- a/src/gui/widgets/battletab.h
+++ b/src/gui/widgets/battletab.h
@@ -28,7 +28,7 @@
/**
* A tab for a party chat channel.
*/
-class BattleTab : public ChatTab
+class BattleTab final : public ChatTab
{
public:
BattleTab();
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index ed7208031..e95507c8c 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -36,14 +36,14 @@ class Image;
class Resource;
class LinkHandler;
-struct BROWSER_LINK
+struct BROWSER_LINK final
{
int x1, x2, y1, y2; /**< Where link is placed */
std::string link;
std::string caption;
};
-class LinePart
+class LinePart final
{
public:
LinePart(const int x, const int y, const gcn::Color color,
@@ -74,8 +74,8 @@ class LinePart
* A simple browser box able to handle links and forward events to the
* parent conteiner.
*/
-class BrowserBox : public gcn::Widget,
- public gcn::MouseListener
+class BrowserBox final : public gcn::Widget,
+ public gcn::MouseListener
{
public:
/**
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index f57e9a7cd..fbc040171 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -39,7 +39,7 @@ const std::string BUTTON_PLAY = "buttonplay.png";
*
* \ingroup GUI
*/
-class Button : public gcn::Button, public gcn::WidgetListener
+class Button final : public gcn::Button, public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index d78027b67..92126e929 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -30,7 +30,7 @@ class Channel;
/**
* A tab for a chat channel.
*/
-class ChannelTab : public ChatTab
+class ChannelTab final : public ChatTab
{
public:
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index ff1c2d56c..bb3cf751a 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -34,7 +34,7 @@ class Image;
*
* \ingroup GUI
*/
-class CheckBox : public gcn::CheckBox
+class CheckBox final : public gcn::CheckBox
{
public:
/**
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index 1ca411732..3cff9a75a 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -46,7 +46,7 @@ namespace gcn
*
* \ingroup GUI
*/
-class Desktop : public Container, private gcn::WidgetListener
+class Desktop final : public Container, private gcn::WidgetListener
{
public:
Desktop();
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index c01466c03..813a19e5f 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -37,7 +37,7 @@ class ImageRect;
* DropDown you must give DropDown an implemented ListModel which represents
* your list.
*/
-class DropDown : public gcn::DropDown
+class DropDown final : public gcn::DropDown
{
public:
/**
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index 99ff8bd2e..0544bf07c 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -36,7 +36,7 @@ class ItemPopup;
*
* \ingroup GUI
*/
-class DropShortcutContainer : public ShortcutContainer
+class DropShortcutContainer final : public ShortcutContainer
{
public:
/**
diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h
index 14f41bdd3..56a1629d7 100644
--- a/src/gui/widgets/emoteshortcutcontainer.h
+++ b/src/gui/widgets/emoteshortcutcontainer.h
@@ -37,7 +37,7 @@ class TextPopup;
*
* \ingroup GUI
*/
-class EmoteShortcutContainer : public ShortcutContainer
+class EmoteShortcutContainer final : public ShortcutContainer
{
public:
/**
diff --git a/src/gui/widgets/extendedlistbox.h b/src/gui/widgets/extendedlistbox.h
index 8d323ae68..196189674 100644
--- a/src/gui/widgets/extendedlistbox.h
+++ b/src/gui/widgets/extendedlistbox.h
@@ -23,7 +23,7 @@
#include "gui/widgets/listbox.h"
-class ExtendedListBox : public ListBox
+class ExtendedListBox final : public ListBox
{
public:
/**
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index c58a8f121..f0d1d9638 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -31,8 +31,8 @@
*
* \ingroup GUI
*/
-class FlowContainer : public Container,
- public gcn::WidgetListener
+class FlowContainer final : public Container,
+ public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/guildchattab.h b/src/gui/widgets/guildchattab.h
index 358c1f1d4..a8f47db25 100644
--- a/src/gui/widgets/guildchattab.h
+++ b/src/gui/widgets/guildchattab.h
@@ -28,7 +28,7 @@
/**
* A tab for a guild chat channel.
*/
-class GuildChatTab : public ChatTab
+class GuildChatTab final : public ChatTab
{
public:
GuildChatTab();
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 4cd6d03cf..7005386b6 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -39,7 +39,7 @@
float GuiTable::mAlpha = 1.0;
-class GuiTableActionListener : public gcn::ActionListener
+class GuiTableActionListener final : public gcn::ActionListener
{
public:
GuiTableActionListener(GuiTable *_table, gcn::Widget *_widget,
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 77abfdd4b..af6bedb62 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -44,10 +44,10 @@ class GuiTableActionListener;
*
* \ingroup GUI
*/
-class GuiTable : public gcn::Widget,
- public gcn::MouseListener,
- public gcn::KeyListener,
- public TableModelListener
+class GuiTable final : public gcn::Widget,
+ public gcn::MouseListener,
+ public gcn::KeyListener,
+ public TableModelListener
{
// so that the action listener can call distributeActionEvent
friend class GuiTableActionListener;
diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h
index b41370ac1..736d8fd98 100644
--- a/src/gui/widgets/horizontcontainer.h
+++ b/src/gui/widgets/horizontcontainer.h
@@ -31,7 +31,7 @@
*
* This container places it's contents veritcally.
*/
-class HorizontContainer : public Container, public gcn::WidgetListener
+class HorizontContainer final : public Container, public gcn::WidgetListener
{
public:
HorizontContainer(const int height, const int spacing);
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 150f34576..62e8ac1b1 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -32,7 +32,7 @@ class Image;
*
* \ingroup GUI
*/
-class Icon : public gcn::Widget
+class Icon final : public gcn::Widget
{
public:
/**
diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h
index 0f92692f3..a820de8a3 100644
--- a/src/gui/widgets/inttextfield.h
+++ b/src/gui/widgets/inttextfield.h
@@ -28,7 +28,7 @@
/**
* TextBox which only accepts numbers as input.
*/
-class IntTextField : public TextField
+class IntTextField final : public TextField
{
public:
/**
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index aa254c30b..854d055d2 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -55,7 +55,7 @@
static const int BOX_WIDTH = 35;
static const int BOX_HEIGHT = 43;
-class ItemIdPair
+class ItemIdPair final
{
public:
ItemIdPair(const int id, Item *const item) :
@@ -67,7 +67,7 @@ class ItemIdPair
Item* mItem;
};
-class SortItemAlphaFunctor
+class SortItemAlphaFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -81,7 +81,7 @@ class SortItemAlphaFunctor
}
} itemAlphaSorter;
-class SortItemIdFunctor
+class SortItemIdFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -94,7 +94,7 @@ class SortItemIdFunctor
}
} itemIdSorter;
-class SortItemWeightFunctor
+class SortItemWeightFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -114,7 +114,7 @@ class SortItemWeightFunctor
}
} itemWeightSorter;
-class SortItemAmountFunctor
+class SortItemAmountFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
@@ -134,7 +134,7 @@ class SortItemAmountFunctor
}
} itemAmountSorter;
-class SortItemTypeFunctor
+class SortItemTypeFunctor final
{
public:
bool operator() (const ItemIdPair *const pair1,
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 02309ebc9..40f9a92d7 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -46,10 +46,10 @@ namespace gcn
*
* \ingroup GUI
*/
-class ItemContainer : public gcn::Widget,
- public gcn::KeyListener,
- public gcn::MouseListener,
- public gcn::WidgetListener
+class ItemContainer final : public gcn::Widget,
+ public gcn::KeyListener,
+ public gcn::MouseListener,
+ public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h
index 9f66da991..5deb76c73 100644
--- a/src/gui/widgets/itemlinkhandler.h
+++ b/src/gui/widgets/itemlinkhandler.h
@@ -27,7 +27,7 @@
class ItemPopup;
-class ItemLinkHandler : public LinkHandler
+class ItemLinkHandler final : public LinkHandler
{
public:
ItemLinkHandler();
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index f5135fbb3..92866b10d 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -37,7 +37,7 @@ class SpellPopup;
*
* \ingroup GUI
*/
-class ItemShortcutContainer : public ShortcutContainer
+class ItemShortcutContainer final : public ShortcutContainer
{
public:
/**
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index f2048c94a..b9845ef0a 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -30,7 +30,7 @@
*
* \ingroup GUI
*/
-class Label : public gcn::Label
+class Label final : public gcn::Label
{
public:
/**
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index 71de85320..beccfcb01 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -34,7 +34,7 @@ class LayoutCell;
/**
* This class is a helper for adding widgets to nested tables in a window.
*/
-class ContainerPlacer
+class ContainerPlacer final
{
public:
ContainerPlacer(gcn::Container *c = nullptr, LayoutCell *lc = nullptr):
@@ -67,7 +67,7 @@ class ContainerPlacer
/**
* This class contains a rectangular array of cells.
*/
-class LayoutArray
+class LayoutArray final
{
friend class LayoutCell;
@@ -331,7 +331,7 @@ class LayoutCell
* pixels between rows and between columns, and a margin of 6 pixels around the
* whole layout.
*/
-class Layout : public LayoutCell
+class Layout final : public LayoutCell
{
public:
Layout();
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index c9c5e2471..518168a80 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -32,7 +32,7 @@
* will register itself as a widget listener and relayout the widgets in the
* container dynamically on resize.
*/
-class LayoutHelper : public gcn::WidgetListener
+class LayoutHelper final : public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/mouseevent.h b/src/gui/widgets/mouseevent.h
index e41ed46b8..9ef9f8658 100644
--- a/src/gui/widgets/mouseevent.h
+++ b/src/gui/widgets/mouseevent.h
@@ -25,7 +25,7 @@
#include <guichan/mouseevent.hpp>
#include <guichan/widget.hpp>
-class MouseEvent : public gcn::MouseEvent
+class MouseEvent final : public gcn::MouseEvent
{
public:
MouseEvent(gcn::Widget* source, bool shiftPressed,
diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h
index eca95e6ad..ceb88876e 100644
--- a/src/gui/widgets/passwordfield.h
+++ b/src/gui/widgets/passwordfield.h
@@ -30,7 +30,7 @@
*
* \ingroup GUI
*/
-class PasswordField : public TextField
+class PasswordField final : public TextField
{
public:
/**
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 81fe87f52..dbf104de0 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -38,7 +38,7 @@ class Skin;
*
* \ingroup GUI
*/
-class PlayerBox : public gcn::ScrollArea
+class PlayerBox final : public gcn::ScrollArea
{
public:
/**
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 0b4927cc9..11c8069a3 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -38,7 +38,7 @@ class ImageRect;
*
* \ingroup GUI
*/
-class ProgressBar : public gcn::Widget, public gcn::WidgetListener
+class ProgressBar final : public gcn::Widget, public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index 6d55fd3ce..4046f21d9 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -30,7 +30,7 @@ class SimpleAnimation;
* A widget that indicates progress. Suitable to use instead of a progress bar
* in cases where it is unknown how long something is going to take.
*/
-class ProgressIndicator : public gcn::Widget
+class ProgressIndicator final : public gcn::Widget
{
public:
ProgressIndicator();
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index 2db41cd78..ae846bc77 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -30,7 +30,7 @@ class Image;
/**
* Guichan based RadioButton with custom look
*/
-class RadioButton : public gcn::RadioButton
+class RadioButton final : public gcn::RadioButton
{
public:
/**
diff --git a/src/gui/widgets/radiogroup.h b/src/gui/widgets/radiogroup.h
index fb511971d..19e67d09d 100644
--- a/src/gui/widgets/radiogroup.h
+++ b/src/gui/widgets/radiogroup.h
@@ -25,7 +25,7 @@
#include <guichan/widget.hpp>
-class RadioGroup : public WidgetGroup
+class RadioGroup final : public WidgetGroup
{
public:
RadioGroup(const std::string &group, const int height,
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 870c0eaff..064bfdeb0 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -39,7 +39,7 @@ class ImageRect;
*
* \ingroup GUI
*/
-class ScrollArea : public gcn::ScrollArea, public gcn::WidgetListener
+class ScrollArea final : public gcn::ScrollArea, public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index f1ec4d23b..d8affadd1 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -129,7 +129,7 @@ class SetupItem : public gcn::ActionListener
int mValueType;
};
-class SetupItemCheckBox : public SetupItem
+class SetupItemCheckBox final : public SetupItem
{
public:
SetupItemCheckBox(std::string text, std::string description,
@@ -153,7 +153,7 @@ class SetupItemCheckBox : public SetupItem
CheckBox *mCheckBox;
};
-class SetupItemTextField : public SetupItem
+class SetupItemTextField final : public SetupItem
{
public:
SetupItemTextField(std::string text, std::string description,
@@ -186,7 +186,7 @@ class SetupItemTextField : public SetupItem
EditDialog *mEditDialog;
};
-class SetupItemIntTextField : public SetupItem
+class SetupItemIntTextField final : public SetupItem
{
public:
SetupItemIntTextField(std::string text, std::string description,
@@ -225,7 +225,7 @@ class SetupItemIntTextField : public SetupItem
EditDialog *mEditDialog;
};
-class SetupItemLabel : public SetupItem
+class SetupItemLabel final : public SetupItem
{
public:
SetupItemLabel(std::string text, std::string description,
@@ -249,7 +249,7 @@ class SetupItemLabel : public SetupItem
bool mIsSeparator;
};
-class SetupItemDropDown : public SetupItem
+class SetupItemDropDown final : public SetupItem
{
public:
SetupItemDropDown(std::string text, std::string description,
@@ -277,7 +277,7 @@ class SetupItemDropDown : public SetupItem
DropDown *mDropDown;
};
-class SetupItemSlider : public SetupItem
+class SetupItemSlider final : public SetupItem
{
public:
SetupItemSlider(std::string text, std::string description,
@@ -323,7 +323,7 @@ typedef std::vector<std::string> SetupItemNames;
typedef SetupItemNames::iterator SetupItemNamesIter;
typedef SetupItemNames::const_iterator SetupItemNamesConstIter;
-class SetupItemSlider2 : public SetupItem
+class SetupItemSlider2 final : public SetupItem
{
public:
SetupItemSlider2(std::string text, std::string description,
@@ -413,7 +413,7 @@ class SetupItemSliderList : public SetupItem
bool mOnTheFly;
};
-class SetupItemSound : public SetupItemSliderList
+class SetupItemSound final : public SetupItemSliderList
{
public:
SetupItemSound(std::string text, std::string description,
diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h
index 038c10093..978926420 100644
--- a/src/gui/widgets/shopitems.h
+++ b/src/gui/widgets/shopitems.h
@@ -28,6 +28,8 @@
#include <string>
#include <vector>
+#include "localconsts.h"
+
class ShopItem;
/**
@@ -39,7 +41,7 @@ class ShopItem;
*
* This functionality can be enabled in the constructor.
*/
-class ShopItems : public gcn::ListModel
+class ShopItems final : public gcn::ListModel
{
public:
/**
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index f34c8d772..ed5bfa003 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -35,7 +35,7 @@ class ItemPopup;
*
* \ingroup GUI
*/
-class ShopListBox : public ListBox
+class ShopListBox final : public ListBox
{
public:
/**
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index 95d23f83e..494039c73 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -33,7 +33,7 @@ class ImageRect;
*
* \ingroup GUI
*/
-class Slider : public gcn::Slider
+class Slider final : public gcn::Slider
{
public:
/**
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index 992316a1b..76dbc012c 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -32,9 +32,9 @@
class Button;
class Label;
-class SliderList : public Container,
- public gcn::ActionListener,
- public gcn::MouseListener
+class SliderList final : public Container,
+ public gcn::ActionListener,
+ public gcn::MouseListener
{
public:
SliderList(gcn::ListModel *const listModel = nullptr,
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index 22fe15d95..570b8b263 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -36,7 +36,7 @@ class TextCommand;
*
* \ingroup GUI
*/
-class SpellShortcutContainer : public ShortcutContainer
+class SpellShortcutContainer final : public ShortcutContainer
{
public:
/**
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 0513c2858..a616a9935 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -37,7 +37,7 @@ class Tab;
/**
* A tabbed area, the same as the guichan tabbed area in 0.8, but extended
*/
-class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
+class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener
{
public:
/**
diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h
index 86acd0cc9..4e3938038 100644
--- a/src/gui/widgets/tablemodel.h
+++ b/src/gui/widgets/tablemodel.h
@@ -26,6 +26,8 @@
#include <set>
#include <vector>
+#include "localconsts.h"
+
namespace gcn
{
class Widget;
@@ -103,7 +105,7 @@ private:
};
-class StaticTableModel : public TableModel
+class StaticTableModel final : public TableModel
{
public:
StaticTableModel(const int width, const int height);
diff --git a/src/gui/widgets/tabstrip.h b/src/gui/widgets/tabstrip.h
index 92d864b79..fac0fc502 100644
--- a/src/gui/widgets/tabstrip.h
+++ b/src/gui/widgets/tabstrip.h
@@ -26,7 +26,7 @@
#include <guichan/actionevent.hpp>
#include <guichan/widget.hpp>
-class TabStrip : public WidgetGroup
+class TabStrip final : public WidgetGroup
{
public:
TabStrip(const std::string &group, const int height,
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index dcd289a60..a95fd118a 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -32,7 +32,7 @@
*
* \ingroup GUI
*/
-class TextBox : public gcn::TextBox
+class TextBox final : public gcn::TextBox
{
public:
/**
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index 06c588215..e116e939b 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -30,7 +30,7 @@
/**
* Preview widget for particle colors, etc.
*/
-class TextPreview : public gcn::Widget
+class TextPreview final : public gcn::Widget
{
public:
TextPreview(const std::string &text);
diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h
index 44922c31a..a31376263 100644
--- a/src/gui/widgets/tradetab.h
+++ b/src/gui/widgets/tradetab.h
@@ -28,7 +28,7 @@
/**
* A tab for a party chat channel.
*/
-class TradeTab : public ChatTab
+class TradeTab final : public ChatTab
{
public:
TradeTab();
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index e02d43c24..2c9087db2 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -33,7 +33,7 @@
*
* This container places it's contents veritcally.
*/
-class VertContainer : public Container, public gcn::WidgetListener
+class VertContainer final : public Container, public gcn::WidgetListener
{
public:
VertContainer(const int verticalItemSize, const bool resizable = true,
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index eec66768c..2a8ca1ab0 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -30,7 +30,7 @@ class Channel;
/**
* A tab for whispers from a single player.
*/
-class WhisperTab : public ChatTab
+class WhisperTab final : public ChatTab
{
public:
const std::string &getNick() const
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index c0be9a1fe..1a2956df1 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -44,11 +44,11 @@ class TextPopup;
*
* \ingroup Interface
*/
-class WindowMenu : public Container,
- public ConfigListener,
- public gcn::ActionListener,
- public gcn::SelectionListener,
- public gcn::MouseListener
+class WindowMenu final : public Container,
+ public ConfigListener,
+ public gcn::ActionListener,
+ public gcn::SelectionListener,
+ public gcn::MouseListener
{
public:
WindowMenu();
diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp
index d98dd97b4..7e77ffc6d 100644
--- a/src/gui/worldselectdialog.cpp
+++ b/src/gui/worldselectdialog.cpp
@@ -46,7 +46,7 @@ extern WorldInfo **server_info;
/**
* The list model for the server list.
*/
-class WorldListModel : public gcn::ListModel
+class WorldListModel final : public gcn::ListModel
{
public:
WorldListModel(Worlds worlds):
diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h
index dd78391fe..30500d311 100644
--- a/src/gui/worldselectdialog.h
+++ b/src/gui/worldselectdialog.h
@@ -47,8 +47,8 @@ namespace gcn
*
* \ingroup Interface
*/
-class WorldSelectDialog : public Window, public gcn::ActionListener,
- public gcn::KeyListener
+class WorldSelectDialog final : public Window, public gcn::ActionListener,
+ public gcn::KeyListener
{
public:
/**
diff --git a/src/guichan/include/guichan/actionevent.hpp b/src/guichan/include/guichan/actionevent.hpp
index b8927931c..082f7bdef 100644
--- a/src/guichan/include/guichan/actionevent.hpp
+++ b/src/guichan/include/guichan/actionevent.hpp
@@ -50,6 +50,8 @@
#include <string>
+#include "localconsts.h"
+
namespace gcn
{
class Widget;
@@ -76,7 +78,7 @@ namespace gcn
* @author Olof Naessén
* @since 0.6.0
*/
- class GCN_CORE_DECLSPEC ActionEvent: public Event
+ class GCN_CORE_DECLSPEC ActionEvent final : public Event
{
public:
diff --git a/src/guichan/include/guichan/cliprectangle.hpp b/src/guichan/include/guichan/cliprectangle.hpp
index 886153549..7e59d0d0f 100644
--- a/src/guichan/include/guichan/cliprectangle.hpp
+++ b/src/guichan/include/guichan/cliprectangle.hpp
@@ -48,6 +48,8 @@
#include "guichan/rectangle.hpp"
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
/**
@@ -56,7 +58,7 @@ namespace gcn
* offsets. The offsets are used for calculations from relative
* screen coordinates to actual screen coordinates.
*/
- class GCN_CORE_DECLSPEC ClipRectangle : public Rectangle
+ class GCN_CORE_DECLSPEC ClipRectangle final : public Rectangle
{
public:
diff --git a/src/guichan/include/guichan/color.hpp b/src/guichan/include/guichan/color.hpp
index 795cdc12d..0fcd6ba6f 100644
--- a/src/guichan/include/guichan/color.hpp
+++ b/src/guichan/include/guichan/color.hpp
@@ -49,12 +49,14 @@
#include <iostream>
+#include "localconsts.h"
+
namespace gcn
{
/**
* Represents a color with red, green, blue and alpha components.
*/
- class GCN_CORE_DECLSPEC Color
+ class GCN_CORE_DECLSPEC Color final
{
public:
diff --git a/src/guichan/include/guichan/defaultfont.hpp b/src/guichan/include/guichan/defaultfont.hpp
index 7da9041d7..c09802ee3 100644
--- a/src/guichan/include/guichan/defaultfont.hpp
+++ b/src/guichan/include/guichan/defaultfont.hpp
@@ -48,6 +48,8 @@
#include "guichan/font.hpp"
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
/**
@@ -55,7 +57,7 @@ namespace gcn
* in Guichan if no font has been set merely to show that no font has
* been set.
*/
- class GCN_CORE_DECLSPEC DefaultFont : public Font
+ class GCN_CORE_DECLSPEC DefaultFont final : public Font
{
public:
diff --git a/src/guichan/include/guichan/exception.hpp b/src/guichan/include/guichan/exception.hpp
index e2dd958be..0e929ebe1 100644
--- a/src/guichan/include/guichan/exception.hpp
+++ b/src/guichan/include/guichan/exception.hpp
@@ -49,6 +49,8 @@
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
#ifndef __FUNCTION__
#define __FUNCTION__ "?"
#endif
@@ -83,7 +85,7 @@ namespace gcn
* throw GCN_EXCEPTION("my error message");
* @endcode
*/
- class GCN_CORE_DECLSPEC Exception
+ class GCN_CORE_DECLSPEC Exception final
{
public:
diff --git a/src/guichan/include/guichan/key.hpp b/src/guichan/include/guichan/key.hpp
index 9b31d7c6b..c2af0ac60 100644
--- a/src/guichan/include/guichan/key.hpp
+++ b/src/guichan/include/guichan/key.hpp
@@ -47,6 +47,8 @@
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
// windows.h defines DELETE which breaks this file as we have a constant named
// DELETE, hence we undefine DELETE if it is defined and hope people don't use
// that windows define with Guichan.
@@ -59,7 +61,7 @@ namespace gcn
/**
* Represents a key or a character.
*/
- class GCN_CORE_DECLSPEC Key
+ class GCN_CORE_DECLSPEC Key final
{
public:
diff --git a/src/guichan/include/guichan/mouseinput.hpp b/src/guichan/include/guichan/mouseinput.hpp
index 99ed1fad8..b2fc9d36a 100644
--- a/src/guichan/include/guichan/mouseinput.hpp
+++ b/src/guichan/include/guichan/mouseinput.hpp
@@ -47,6 +47,8 @@
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
@@ -59,7 +61,7 @@ namespace gcn
* @author Per Larsson
* @since 0.1.0
*/
- class GCN_CORE_DECLSPEC MouseInput
+ class GCN_CORE_DECLSPEC MouseInput final
{
public:
diff --git a/src/guichan/include/guichan/selectionevent.hpp b/src/guichan/include/guichan/selectionevent.hpp
index 53efc93f5..fc6c2050b 100644
--- a/src/guichan/include/guichan/selectionevent.hpp
+++ b/src/guichan/include/guichan/selectionevent.hpp
@@ -48,6 +48,8 @@
#include "guichan/event.hpp"
#include "guichan/platform.hpp"
+#include "localconsts.h"
+
namespace gcn
{
class Widget;
@@ -58,7 +60,7 @@ namespace gcn
* @author Olof Naessén
* @since 0.8.0
*/
- class GCN_CORE_DECLSPEC SelectionEvent: public Event
+ class GCN_CORE_DECLSPEC SelectionEvent final: public Event
{
public:
diff --git a/src/guild.cpp b/src/guild.cpp
index 8a611b1dd..a589f866f 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -28,7 +28,7 @@
#include "debug.h"
-class SortGuildFunctor
+class SortGuildFunctor final
{
public:
bool operator() (const GuildMember *const m1,
diff --git a/src/guild.h b/src/guild.h
index e5a382eea..d54d4581f 100644
--- a/src/guild.h
+++ b/src/guild.h
@@ -36,7 +36,7 @@ class Guild;
typedef std::map<unsigned, std::string> PositionsMap;
-class GuildMember : public Avatar
+class GuildMember final : public Avatar
{
public:
Guild *getGuild() const
@@ -62,7 +62,7 @@ protected:
int mPos;
};
-class Guild : public AvatarListModel
+class Guild final : public AvatarListModel
{
public:
virtual ~Guild();
diff --git a/src/guildmanager.h b/src/guildmanager.h
index 4aa2901e6..ab1542b24 100644
--- a/src/guildmanager.h
+++ b/src/guildmanager.h
@@ -25,10 +25,12 @@
#include <map>
+#include "localconsts.h"
+
class Guild;
class GuildChatTab;
-class GuildManager
+class GuildManager final
{
public:
GuildManager();
diff --git a/src/imagesprite.h b/src/imagesprite.h
index f7229eed4..3f5ba6db6 100644
--- a/src/imagesprite.h
+++ b/src/imagesprite.h
@@ -28,7 +28,7 @@
class Graphics;
-class ImageSprite : public Sprite
+class ImageSprite final : public Sprite
{
public:
ImageSprite(Image *const image);
diff --git a/src/inputevent.h b/src/inputevent.h
index cc2fbe5fb..e3dc1382c 100644
--- a/src/inputevent.h
+++ b/src/inputevent.h
@@ -24,6 +24,8 @@
#include <map>
#include <vector>
+#include "localconsts.h"
+
typedef std::vector<int> KeysVector;
typedef KeysVector::iterator KeysVectorIter;
typedef KeysVector::const_iterator KeysVectorCIter;
@@ -37,7 +39,7 @@ typedef KeyToIdMap::iterator KeyToIdMapIter;
typedef std::map<int, int> KeyTimeMap;
typedef KeyTimeMap::iterator KeyTimeMapIter;
-struct InputEvent
+struct InputEvent final
{
InputEvent(const int action0, const int mask0);
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index a5994907e..e45cda6b1 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -50,7 +50,7 @@ InputManager inputManager;
extern QuitDialog *quitDialog;
-class KeyFunctor
+class KeyFunctor final
{
public:
bool operator() (const int key1, const int key2) const
diff --git a/src/inputmanager.h b/src/inputmanager.h
index 213781bed..f3f5fc735 100644
--- a/src/inputmanager.h
+++ b/src/inputmanager.h
@@ -51,7 +51,7 @@ enum KeyTypes
INPUT_JOYSTICK = 3
};
-struct KeyItem
+struct KeyItem final
{
KeyItem() :
type(-1), value(-1)
@@ -66,7 +66,7 @@ struct KeyItem
int value;
};
-struct KeyFunction
+struct KeyFunction final
{
KeyItem values[KeyFunctionSize];
};
@@ -89,7 +89,7 @@ enum KeyCondition
COND_GAME2 = 2 + 8 + 16 + 64
};
-class InputManager
+class InputManager final
{
public:
InputManager();
diff --git a/src/inventory.cpp b/src/inventory.cpp
index ebbf31326..64f13478b 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -37,7 +37,7 @@
#include "debug.h"
-struct SlotUsed : public std::unary_function<Item*, bool>
+struct SlotUsed final : public std::unary_function<Item*, bool>
{
bool operator()(const Item *const item) const
{
diff --git a/src/inventory.h b/src/inventory.h
index f7d3e448f..b17e480ed 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -44,7 +44,7 @@ class InventoryListener
{ }
};
-class Inventory
+class Inventory final
{
public:
static const int NO_SLOT_INDEX = -1; /**< Slot has no index. */
diff --git a/src/itemshortcut.h b/src/itemshortcut.h
index 6ef5d996a..dcdc515a5 100644
--- a/src/itemshortcut.h
+++ b/src/itemshortcut.h
@@ -23,6 +23,8 @@
#ifndef ITEMSHORTCUT_H
#define ITEMSHORTCUT_H
+#include "localconsts.h"
+
const unsigned int SHORTCUT_ITEMS = 20;
const unsigned int SHORTCUT_TABS = 3;
@@ -31,7 +33,7 @@ class Item;
/**
* The class which keeps track of the item shortcuts.
*/
-class ItemShortcut
+class ItemShortcut final
{
public:
/**
diff --git a/src/joystick.h b/src/joystick.h
index 22826e43d..0120dd9d0 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -30,7 +30,7 @@
#include <string>
#include <vector>
-class Joystick
+class Joystick final
{
public:
/**
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index 6f01618ec..b6e85a28f 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -34,7 +34,7 @@
union SDL_Event;
-class KeyboardConfig
+class KeyboardConfig final
{
public:
KeyboardConfig();
diff --git a/src/keydata.h b/src/keydata.h
index 88ff7f4ca..b5107113e 100644
--- a/src/keydata.h
+++ b/src/keydata.h
@@ -29,7 +29,7 @@
typedef bool (*ActionFuncPtr) (const InputEvent &event);
-struct KeyData
+struct KeyData final
{
const char *configField;
int defaultType1;
diff --git a/src/keyevent.h b/src/keyevent.h
index c57544e97..84d022613 100644
--- a/src/keyevent.h
+++ b/src/keyevent.h
@@ -29,7 +29,7 @@
#include <string>
-class KeyEvent : public gcn::KeyEvent
+class KeyEvent final : public gcn::KeyEvent
{
public:
KeyEvent(gcn::Widget *const source,
diff --git a/src/keyinput.h b/src/keyinput.h
index 52ca2f211..ae57408de 100644
--- a/src/keyinput.h
+++ b/src/keyinput.h
@@ -27,7 +27,7 @@
#include <string>
-class KeyInput : public gcn::KeyInput
+class KeyInput final : public gcn::KeyInput
{
public:
KeyInput();
diff --git a/src/localconsts.h b/src/localconsts.h
index 61d1e0531..f9cf19a9c 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -21,6 +21,8 @@
#if !defined(__GXX_EXPERIMENTAL_CXX0X__)
#undef nullptr
#define nullptr 0
+#define final
+#define override
#else
#undef Z_NULL
#define Z_NULL nullptr
diff --git a/src/localplayer.h b/src/localplayer.h
index 6dce18e8c..cfd2902d2 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -43,7 +43,7 @@ class Map;
class OkDialog;
struct SkillInfo;
-class AwayListener : public gcn::ActionListener
+class AwayListener final : public gcn::ActionListener
{
public:
void action(const gcn::ActionEvent &event);
@@ -66,8 +66,9 @@ enum
/**
* The local player character.
*/
-class LocalPlayer : public Being, public ActorSpriteListener,
- public Listener
+class LocalPlayer final : public Being,
+ public ActorSpriteListener,
+ public Listener
{
public:
/**
diff --git a/src/logger.h b/src/logger.h
index 32b7d32c8..dbcc9485a 100644
--- a/src/logger.h
+++ b/src/logger.h
@@ -26,6 +26,8 @@
#include "main.h"
#include <fstream>
+#include "localconsts.h"
+
class ChatWindow;
#ifdef ENABLEDEBUGLOG
@@ -37,7 +39,7 @@ class ChatWindow;
/**
* The Log Class : Useful to write debug or info messages
*/
-class Logger
+class Logger final
{
public:
/**
diff --git a/src/map.cpp b/src/map.cpp
index 087a16a55..71d0f5ee4 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -52,7 +52,7 @@
/**
* A location on a tile map. Used for pathfinding, open list.
*/
-struct Location
+struct Location final
{
/**
* Constructor.
@@ -73,7 +73,7 @@ struct Location
MetaTile *tile;
};
-class ActorFunctuator
+class ActorFunctuator final
{
public:
bool operator()(const Actor *const a, const Actor *const b) const
diff --git a/src/map.h b/src/map.h
index b90cbc2a7..c48ae6f95 100644
--- a/src/map.h
+++ b/src/map.h
@@ -56,7 +56,7 @@ typedef AmbientLayerVector::const_iterator AmbientLayerVectorCIter;
* This is information that doesn't need to be repeated for each tile in each
* layer of the map.
*/
-struct MetaTile
+struct MetaTile final
{
/**
* Constructor.
@@ -78,7 +78,7 @@ struct MetaTile
/**
* Animation cycle of a tile image which changes the map accordingly.
*/
-class TileAnimation
+class TileAnimation final
{
public:
TileAnimation(Animation *const ani);
@@ -102,7 +102,7 @@ typedef TileAnimationMap::const_iterator TileAnimationMapCIter;
/**
* A tile map.
*/
-class Map : public Properties, public ConfigListener
+class Map final : public Properties, public ConfigListener
{
public:
enum BlockType
diff --git a/src/maplayer.h b/src/maplayer.h
index fa6bd3e15..1042b2a87 100644
--- a/src/maplayer.h
+++ b/src/maplayer.h
@@ -37,7 +37,7 @@ class ImageVertexes;
typedef std::vector<ImageVertexes*> MepRowImages;
-class MapRowVertexes
+class MapRowVertexes final
{
public:
MapRowVertexes()
@@ -50,7 +50,7 @@ class MapRowVertexes
MepRowImages images;
};
-class MapObject
+class MapObject final
{
public:
MapObject(const int type0, const std::string &data0) :
@@ -62,7 +62,7 @@ class MapObject
std::string data;
};
-class MapObjectList
+class MapObjectList final
{
public:
std::vector<MapObject> objects;
@@ -72,7 +72,7 @@ class MapObjectList
* A map layer. Stores a grid of tiles and their offset, and implements layer
* rendering.
*/
-class MapLayer: public ConfigListener
+class MapLayer final: public ConfigListener
{
public:
friend class Map;
@@ -177,7 +177,7 @@ class MapLayer: public ConfigListener
MapRows mTempRows;
};
-class SpecialLayer
+class SpecialLayer final
{
public:
friend class Map;
@@ -211,7 +211,7 @@ class SpecialLayer
MapItem **mTiles;
};
-class MapItem
+class MapItem final
{
public:
friend class Map;
@@ -284,7 +284,7 @@ class MapItem
int mY;
};
-class ObjectsLayer
+class ObjectsLayer final
{
public:
ObjectsLayer(const unsigned width, const unsigned height);
diff --git a/src/mumblemanager.h b/src/mumblemanager.h
index c95d8b4de..be40a1c2c 100644
--- a/src/mumblemanager.h
+++ b/src/mumblemanager.h
@@ -13,6 +13,8 @@
#include <string>
#include <stdint.h>
+#include "localconsts.h"
+
struct LinkedMem
{
uint32_t uiVersion;
@@ -30,7 +32,7 @@ struct LinkedMem
wchar_t description[2048];
};
-class MumbleManager
+class MumbleManager final
{
public:
MumbleManager();
diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h
index 29ef6a13b..a70b153b5 100644
--- a/src/normalopenglgraphics.h
+++ b/src/normalopenglgraphics.h
@@ -39,7 +39,7 @@
#include <set>
-class NormalOpenGLGraphics : public Graphics
+class NormalOpenGLGraphics final : public Graphics
{
public:
NormalOpenGLGraphics();
diff --git a/src/particlecontainer.h b/src/particlecontainer.h
index f83b62d1a..0f1480094 100644
--- a/src/particlecontainer.h
+++ b/src/particlecontainer.h
@@ -73,7 +73,7 @@ protected:
/**
* Linked list of particle effects.
*/
-class ParticleList : public ParticleContainer
+class ParticleList final : public ParticleContainer
{
public:
ParticleList(ParticleContainer *const parent = nullptr,
@@ -101,7 +101,7 @@ protected:
/**
* Particle container with indexing facilities
*/
-class ParticleVector : public ParticleContainer
+class ParticleVector final : public ParticleContainer
{
public:
ParticleVector(ParticleContainer *const parent = nullptr,
diff --git a/src/particleemitter.h b/src/particleemitter.h
index 17d388f82..a9bf44b45 100644
--- a/src/particleemitter.h
+++ b/src/particleemitter.h
@@ -40,7 +40,7 @@ class Particle;
* Every Particle can have one or more particle emitters that create new
* particles when they are updated
*/
-class ParticleEmitter
+class ParticleEmitter final
{
public:
ParticleEmitter(const XmlNodePtr emitterNode, Particle *const target,
diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h
index 354cb0229..e9f3661d1 100644
--- a/src/particleemitterprop.h
+++ b/src/particleemitterprop.h
@@ -23,6 +23,8 @@
#include <cmath>
#include <cstdlib>
+#include "localconsts.h"
+
/**
* Returns a random numeric value that is larger than or equal min and smaller
* than max
@@ -37,7 +39,7 @@ enum ChangeFunc
FUNC_SQUARE
};
-template <typename T> struct ParticleEmitterProp
+template <typename T> struct ParticleEmitterProp final
{
ParticleEmitterProp():
minVal(0), maxVal(0), changeFunc(FUNC_NONE),
diff --git a/src/party.cpp b/src/party.cpp
index 08e9afcd1..e32e79aae 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -27,7 +27,7 @@
#include "utils/stringutils.h"
-class SortPartyFunctor
+class SortPartyFunctor final
{
public:
bool operator() (const PartyMember *const p1,
diff --git a/src/party.h b/src/party.h
index 870122383..2d7386f17 100644
--- a/src/party.h
+++ b/src/party.h
@@ -32,7 +32,7 @@
class Party;
-class PartyMember : public Avatar
+class PartyMember final : public Avatar
{
public:
Party *getParty() const
@@ -53,7 +53,7 @@ protected:
bool mLeader;
};
-class Party : public AvatarListModel
+class Party final : public AvatarListModel
{
public:
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index 29c538bfc..04a5ba178 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -318,7 +318,7 @@ void updateAttrs()
}
}
-class PlayerInfoListener : private Listener
+class PlayerInfoListener final : private Listener
{
public:
PlayerInfoListener()
diff --git a/src/playerinfo.h b/src/playerinfo.h
index 63612166a..ebfdba4c6 100644
--- a/src/playerinfo.h
+++ b/src/playerinfo.h
@@ -45,7 +45,7 @@ typedef std::map<int, Stat> StatMap;
/**
* Backend for core player information.
*/
-struct PlayerInfoBackend
+struct PlayerInfoBackend final
{
IntMap mAttributes;
StatMap mStats;
@@ -58,7 +58,7 @@ class Item;
/**
* Special information storage structure.
*/
-struct Special
+struct Special final
{
int currentMana;
int neededMana;
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 5f696413b..b163f57b0 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -48,7 +48,7 @@ typedef PlayerRelations::const_iterator PlayerRelationsCIter;
typedef std::list<PlayerRelationsListener *> PlayerRelationListeners;
typedef PlayerRelationListeners::const_iterator PlayerRelationListenersCIter;
-class SortPlayersFunctor
+class SortPlayersFunctor final
{
public:
bool operator() (const std::string &str1,
@@ -65,7 +65,7 @@ class SortPlayersFunctor
} playersSorter;
// (De)serialisation class
-class PlayerConfSerialiser :
+class PlayerConfSerialiser final :
public ConfigurationListManager<std::pair<std::string, PlayerRelation *>,
std::map<std::string, PlayerRelation *> *>
{
@@ -463,7 +463,7 @@ bool PlayerRelationsManager::checkBadRelation(std::string name)
// ignore strategies
-class PIS_nothing : public PlayerIgnoreStrategy
+class PIS_nothing final : public PlayerIgnoreStrategy
{
public:
PIS_nothing() :
@@ -479,7 +479,7 @@ public:
}
};
-class PIS_dotdotdot : public PlayerIgnoreStrategy
+class PIS_dotdotdot final : public PlayerIgnoreStrategy
{
public:
PIS_dotdotdot() :
@@ -500,7 +500,7 @@ public:
};
-class PIS_blinkname : public PlayerIgnoreStrategy
+class PIS_blinkname final : public PlayerIgnoreStrategy
{
public:
PIS_blinkname() :
@@ -520,7 +520,7 @@ public:
}
};
-class PIS_emote : public PlayerIgnoreStrategy
+class PIS_emote final : public PlayerIgnoreStrategy
{
public:
PIS_emote(const uint8_t emote_nr, const std::string &description,
diff --git a/src/playerrelations.h b/src/playerrelations.h
index e4a5a9e98..6b2ed62d5 100644
--- a/src/playerrelations.h
+++ b/src/playerrelations.h
@@ -28,9 +28,11 @@
#include <list>
#include <map>
+#include "localconsts.h"
+
class Being;
-struct PlayerRelation
+struct PlayerRelation final
{
static const unsigned int EMOTE = (1 << 0);
static const unsigned int SPEECH_FLOAT = (1 << 1);
@@ -102,7 +104,7 @@ class PlayerRelationsListener
* preferences the user of the local client has wrt other players (identified
* by std::string).
*/
-class PlayerRelationsManager
+class PlayerRelationsManager final
{
public:
PlayerRelationsManager();
diff --git a/src/position.h b/src/position.h
index 60c762310..717aba8d3 100644
--- a/src/position.h
+++ b/src/position.h
@@ -26,10 +26,12 @@
#include <iostream>
#include <list>
+#include "localconsts.h"
+
/**
* A position along a being's path.
*/
-struct Position
+struct Position final
{
Position(const int x0, const int y0) :
x(x0), y(y0)
diff --git a/src/rotationalparticle.h b/src/rotationalparticle.h
index e951e4c77..d7e8904d4 100644
--- a/src/rotationalparticle.h
+++ b/src/rotationalparticle.h
@@ -31,7 +31,7 @@ class Animation;
class Map;
class SimpleAnimation;
-class RotationalParticle : public ImageParticle
+class RotationalParticle final : public ImageParticle
{
public:
RotationalParticle(Map *const map, Animation *const animation);
diff --git a/src/safeopenglgraphics.h b/src/safeopenglgraphics.h
index a6f22182c..72a9485d7 100644
--- a/src/safeopenglgraphics.h
+++ b/src/safeopenglgraphics.h
@@ -36,7 +36,7 @@
#include <SDL_opengl.h>
#include <GL/glext.h>
-class SafeOpenGLGraphics : public Graphics
+class SafeOpenGLGraphics final : public Graphics
{
public:
SafeOpenGLGraphics();
diff --git a/src/shopitem.h b/src/shopitem.h
index 0608d0c4a..6ec83f7bf 100644
--- a/src/shopitem.h
+++ b/src/shopitem.h
@@ -27,11 +27,13 @@
#include <stack>
+#include "localconsts.h"
+
/**
* Represents an item in a shop inventory. It can store quantity and inventory
* indices of duplicate entries in the shop as well.
*/
-class ShopItem : public Item
+class ShopItem final : public Item
{
public:
/**
diff --git a/src/simpleanimation.h b/src/simpleanimation.h
index 6e2f1405c..ea9e3aef6 100644
--- a/src/simpleanimation.h
+++ b/src/simpleanimation.h
@@ -25,6 +25,8 @@
#include "utils/xml.h"
+#include "localconsts.h"
+
class Animation;
class Graphics;
class Image;
@@ -35,7 +37,7 @@ struct Frame;
* This class is a leightweight alternative to the AnimatedSprite class.
* It hosts a looping animation without actions and directions.
*/
-class SimpleAnimation
+class SimpleAnimation final
{
public:
/**
diff --git a/src/sound.h b/src/sound.h
index 7db9ecfea..9da26c8fe 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -29,6 +29,8 @@
#include <string>
+#include "localconsts.h"
+
class Music;
static const std::string SOUND_INFO = "soundinfo";
@@ -44,7 +46,7 @@ static const std::string SOUND_GUILD = "soundguild";
*
* \ingroup CORE
*/
-class Sound : public ConfigListener
+class Sound final : public ConfigListener
{
public:
Sound();
diff --git a/src/spellmanager.h b/src/spellmanager.h
index e6f3aae7b..11a23ab67 100644
--- a/src/spellmanager.h
+++ b/src/spellmanager.h
@@ -33,7 +33,7 @@ const int SPELL_MIN_ID = 100000;
const unsigned int SPELL_SHORTCUT_ITEMS = 49;
const unsigned int SPELL_SHORTCUT_TABS = 5;
-class SpellManager
+class SpellManager final
{
public:
SpellManager();
diff --git a/src/spellshortcut.h b/src/spellshortcut.h
index b26211fc4..dfca62e9e 100644
--- a/src/spellshortcut.h
+++ b/src/spellshortcut.h
@@ -30,7 +30,7 @@ class TextCommand;
/**
* The class which keeps track of the item shortcuts.
*/
-class SpellShortcut
+class SpellShortcut final
{
public:
/**
diff --git a/src/statuseffect.h b/src/statuseffect.h
index b5df3a45f..742edcd3f 100644
--- a/src/statuseffect.h
+++ b/src/statuseffect.h
@@ -28,7 +28,7 @@
#include "resources/animation.h"
-class StatusEffect
+class StatusEffect final
{
public:
StatusEffect();
diff --git a/src/text.h b/src/text.h
index b1f1a3d9b..10d85284d 100644
--- a/src/text.h
+++ b/src/text.h
@@ -84,7 +84,7 @@ class Text
static ImageRect mBubble; /**< Speech bubble graphic */
};
-class FlashText : public Text
+class FlashText final : public Text
{
public:
FlashText(const std::string &text, const int x, const int y,
diff --git a/src/textcommand.h b/src/textcommand.h
index f9b44253b..2b188941a 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -25,6 +25,8 @@
#include <string>
+#include "localconsts.h"
+
const unsigned int MAGIC_START_ID = 340;
class Image;
@@ -55,7 +57,7 @@ enum TextCommandType
/**
* Represents one or more instances of a certain item type.
*/
-class TextCommand
+class TextCommand final
{
public:
/**
diff --git a/src/textmanager.h b/src/textmanager.h
index 8819d31dc..49afb6f1c 100644
--- a/src/textmanager.h
+++ b/src/textmanager.h
@@ -24,6 +24,8 @@
#include <list>
+#include "localconsts.h"
+
class Text;
namespace gcn
@@ -31,7 +33,7 @@ namespace gcn
class Graphics;
}
-class TextManager
+class TextManager final
{
public:
/**
diff --git a/src/textparticle.h b/src/textparticle.h
index 55c8eab9d..892a109b8 100644
--- a/src/textparticle.h
+++ b/src/textparticle.h
@@ -25,7 +25,7 @@
#include "particle.h"
-class TextParticle : public Particle
+class TextParticle final : public Particle
{
public:
/**
diff --git a/src/textrenderer.h b/src/textrenderer.h
index e331453fb..f47729eec 100644
--- a/src/textrenderer.h
+++ b/src/textrenderer.h
@@ -29,7 +29,7 @@
* Class for text rendering. Used by the TextParticle, the Text and FlashText
* objects and the Preview in the color dialog.
*/
-class TextRenderer
+class TextRenderer final
{
public:
/**
diff --git a/src/tileset.h b/src/tileset.h
index fe269f2d0..943321864 100644
--- a/src/tileset.h
+++ b/src/tileset.h
@@ -30,7 +30,7 @@
/**
* A tileset, which is basically just an image set but it stores a firstgid.
*/
-class Tileset : public ImageSet
+class Tileset final : public ImageSet
{
public:
/**
diff --git a/src/units.cpp b/src/units.cpp
index 3a2a5dace..aa532ed36 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -33,7 +33,7 @@
#include "debug.h"
-struct UnitLevel
+struct UnitLevel final
{
std::string symbol;
int count;
@@ -41,7 +41,7 @@ struct UnitLevel
std::string separator;
};
-struct UnitDescription
+struct UnitDescription final
{
std::vector<struct UnitLevel> levels;
double conversion;
diff --git a/src/units.h b/src/units.h
index bc9905779..e8e181faf 100644
--- a/src/units.h
+++ b/src/units.h
@@ -25,7 +25,9 @@
#include <string>
-class Units
+#include "localconsts.h"
+
+class Units final
{
public:
/**
diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp
index efc3e285e..d0c4978ff 100644
--- a/src/utils/sha256.cpp
+++ b/src/utils/sha256.cpp
@@ -88,7 +88,7 @@ typedef unsigned int uint32_t;
static const unsigned int SHA256_BLOCK_SIZE = (512 / 8);
/** An sha 256 context, used by original m_opersha256 */
-class SHA256Context
+class SHA256Context final
{
public:
unsigned int tot_len;
diff --git a/src/variabledata.h b/src/variabledata.h
index 3bb3b7705..90279d28e 100644
--- a/src/variabledata.h
+++ b/src/variabledata.h
@@ -24,6 +24,8 @@
#include <string>
+#include "localconsts.h"
+
class VariableData
{
public:
@@ -42,7 +44,7 @@ class VariableData
virtual int getType() const = 0;
};
-class IntData : public VariableData
+class IntData final : public VariableData
{
public:
IntData(const int value) :
@@ -59,7 +61,7 @@ class IntData : public VariableData
int mData;
};
-class StringData : public VariableData
+class StringData final : public VariableData
{
public:
StringData(const std::string &value) :
@@ -76,7 +78,7 @@ class StringData : public VariableData
std::string mData;
};
-class FloatData : public VariableData
+class FloatData final : public VariableData
{
public:
FloatData(const double value) :
@@ -93,7 +95,7 @@ class FloatData : public VariableData
double mData;
};
-class BoolData : public VariableData
+class BoolData final : public VariableData
{
public:
BoolData(const bool value) :
diff --git a/src/vector.h b/src/vector.h
index 93957a90d..587344f39 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -27,11 +27,13 @@
#include <iostream>
+#include "localconsts.h"
+
/**
* Vector class. Represents either a 3D point in space, a velocity or a force.
* Provides several convenient operator overloads.
*/
-class Vector
+class Vector final
{
public:
/**