From b8c77348db8b0bf500cb6a13cce75c61a544c500 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 24 Oct 2013 12:19:01 +0300 Subject: add final keyword to all other files. --- src/actormanager.h | 3 ++- src/animatedsprite.h | 12 ++++++------ src/client.h | 6 +++--- src/flooritem.h | 8 ++++---- src/guild.h | 6 +++--- src/imagesprite.h | 20 ++++++++++---------- src/map.h | 2 +- src/maplayer.h | 2 +- src/party.h | 4 ++-- src/soundmanager.h | 2 +- src/text.h | 2 +- src/variabledata.h | 8 ++++---- 12 files changed, 38 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/actormanager.h b/src/actormanager.h index 93068b8c8..83971b60c 100644 --- a/src/actormanager.h +++ b/src/actormanager.h @@ -235,7 +235,7 @@ class ActorManager final: public ConfigListener bool pickUpNearest(const int x, const int y, int maxdist) const; - void optionChanged(const std::string &name) override; + void optionChanged(const std::string &name) override final; void removeAttackMob(const std::string &name); @@ -319,6 +319,7 @@ class ActorManager final: public ConfigListener excluded = nullptr) const A_WARN_UNUSED; void loadAttackList(); + void storeAttackList() const; ActorSprites mActors; diff --git a/src/animatedsprite.h b/src/animatedsprite.h index 83722ebf8..7b92d5d0e 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -63,14 +63,14 @@ class AnimatedSprite final : public Sprite ~AnimatedSprite(); - bool reset() override; + bool reset() override final; - bool play(const std::string &action) override; + bool play(const std::string &action) override final; - bool update(const int time) override; + bool update(const int time) override final; bool draw(Graphics *const graphics, - const int posX, const int posY) const override; + const int posX, const int posY) const override final; int getWidth() const A_WARN_UNUSED; @@ -89,9 +89,9 @@ class AnimatedSprite final : public Sprite unsigned int getFrameCount() const A_WARN_UNUSED; - void setAlpha(float alpha) override; + void setAlpha(float alpha) override final; - const void *getHash() const override A_WARN_UNUSED; + const void *getHash() const override final A_WARN_UNUSED; bool updateNumber(const unsigned num); diff --git a/src/client.h b/src/client.h index c5fb1e505..48801b274 100644 --- a/src/client.h +++ b/src/client.h @@ -66,7 +66,7 @@ extern int textures_count; class ErrorListener : public gcn::ActionListener { public: - void action(const gcn::ActionEvent &event) override; + void action(const gcn::ActionEvent &event) override final; }; extern std::string errorMessage; @@ -312,9 +312,9 @@ public: static void applyKeyRepeat(); - void optionChanged(const std::string &name) override; + void optionChanged(const std::string &name) override final; - void action(const gcn::ActionEvent &event) override; + void action(const gcn::ActionEvent &event) override final; void initTradeFilter() const; diff --git a/src/flooritem.h b/src/flooritem.h index 612dda22c..2d825b310 100644 --- a/src/flooritem.h +++ b/src/flooritem.h @@ -52,11 +52,11 @@ class FloorItem final : public ActorSprite void postInit(Map *const map, int subX, int subY); - Type getType() const override A_WARN_UNUSED + Type getType() const override final A_WARN_UNUSED { return FLOOR_ITEM; } bool draw(Graphics *const graphics, - const int offsetX, const int offsetY) const override; + const int offsetX, const int offsetY) const override final; /** * Returns the item ID. @@ -72,10 +72,10 @@ class FloorItem final : public ActorSprite std::string getName() const A_WARN_UNUSED; - int getTileX() const override A_WARN_UNUSED + int getTileX() const override final A_WARN_UNUSED { return mX; } - int getTileY() const override A_WARN_UNUSED + int getTileY() const override final A_WARN_UNUSED { return mY; } void incrementPickup() diff --git a/src/guild.h b/src/guild.h index a5f724e44..b17b7d8e1 100644 --- a/src/guild.h +++ b/src/guild.h @@ -50,7 +50,7 @@ public: void setPos(const int pos) { mPos = pos; } - std::string getAdditionString() const override A_WARN_UNUSED; + std::string getAdditionString() const override final A_WARN_UNUSED; protected: friend class Guild; @@ -148,10 +148,10 @@ public: * Get size of members list. * @return Returns the number of members in the guild. */ - int getNumberOfElements() override A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED { return static_cast(mMembers.size()); } - Avatar *getAvatarAt(const int i) override A_WARN_UNUSED; + Avatar *getAvatarAt(const int i) override final A_WARN_UNUSED; /** * Get whether user can invite users to this guild. diff --git a/src/imagesprite.h b/src/imagesprite.h index 038dfb600..e51878e31 100644 --- a/src/imagesprite.h +++ b/src/imagesprite.h @@ -37,41 +37,41 @@ public: ~ImageSprite(); - bool reset() override + bool reset() override final { return false; } - bool play(const std::string &action A_UNUSED) override + bool play(const std::string &action A_UNUSED) override final { return false; } - bool update(const int time A_UNUSED) override + bool update(const int time A_UNUSED) override final { return false; } bool draw(Graphics *const graphics, - const int posX, const int posY) const override; + const int posX, const int posY) const override final; - int getWidth() const override A_WARN_UNUSED + int getWidth() const override final A_WARN_UNUSED { return mImage ? mImage->getWidth() : 0; } - int getHeight() const override A_WARN_UNUSED + int getHeight() const override final A_WARN_UNUSED { return mImage ? mImage->getHeight() : 0; } const Image* getImage() const A_WARN_UNUSED { return mImage; } bool setSpriteDirection(const SpriteDirection - direction A_UNUSED) override + direction A_UNUSED) override final { return false; } int getNumberOfLayers() const A_WARN_UNUSED { return 1; } - unsigned int getCurrentFrame() const override A_WARN_UNUSED + unsigned int getCurrentFrame() const override final A_WARN_UNUSED { return 0; } - unsigned int getFrameCount() const override A_WARN_UNUSED + unsigned int getFrameCount() const override final A_WARN_UNUSED { return 1; } - bool updateNumber(const unsigned num A_UNUSED) override + bool updateNumber(const unsigned num A_UNUSED) override final { return false; } private: diff --git a/src/map.h b/src/map.h index ad7087837..3bddd0c83 100644 --- a/src/map.h +++ b/src/map.h @@ -369,7 +369,7 @@ class Map final : public Properties, public ConfigListener const TileAnimation *getAnimationForGid(const int gid) const A_WARN_UNUSED; - void optionChanged(const std::string &value) override; + void optionChanged(const std::string &value) override final; MapItem *findPortalXY(const int x, const int y) const A_WARN_UNUSED; diff --git a/src/maplayer.h b/src/maplayer.h index ad74ad7d2..f5b4c88a8 100644 --- a/src/maplayer.h +++ b/src/maplayer.h @@ -175,7 +175,7 @@ class MapLayer final: public ConfigListener int getHeight() const A_WARN_UNUSED { return mHeight; } - void optionChanged(const std::string &value) override; + void optionChanged(const std::string &value) override final; int getTileDrawWidth(const Image *img, const int endX, int &width) const A_WARN_UNUSED; diff --git a/src/party.h b/src/party.h index 78fea9528..3acb0101d 100644 --- a/src/party.h +++ b/src/party.h @@ -123,10 +123,10 @@ public: * Get size of members list. * @return Returns the number of members in the party. */ - int getNumberOfElements() override A_WARN_UNUSED + int getNumberOfElements() override final A_WARN_UNUSED { return static_cast(mMembers.size()); } - Avatar *getAvatarAt(const int i) override; + Avatar *getAvatarAt(const int i) override final; /** * Get whether user can invite users to this party. diff --git a/src/soundmanager.h b/src/soundmanager.h index e4398029e..2679fbec5 100644 --- a/src/soundmanager.h +++ b/src/soundmanager.h @@ -46,7 +46,7 @@ class SoundManager final : public ConfigListener ~SoundManager(); - void optionChanged(const std::string &value) override; + void optionChanged(const std::string &value) override final; /** * Installs the sound engine. diff --git a/src/text.h b/src/text.h index 8ce105157..2a5c84cf7 100644 --- a/src/text.h +++ b/src/text.h @@ -112,7 +112,7 @@ class FlashText final : public Text * Draws the text. */ void draw(Graphics *const graphics, - const int xOff, const int yOff) override; + const int xOff, const int yOff) override final; private: int mTime; /**< Time left for flashing */ diff --git a/src/variabledata.h b/src/variabledata.h index a0c0e5be1..715731b8b 100644 --- a/src/variabledata.h +++ b/src/variabledata.h @@ -54,7 +54,7 @@ class IntData final : public VariableData int getData() const A_WARN_UNUSED { return mData; } - int getType() const override A_WARN_UNUSED + int getType() const override final A_WARN_UNUSED { return DATA_INT; } private: @@ -71,7 +71,7 @@ class StringData final : public VariableData const std::string &getData() const A_WARN_UNUSED { return mData; } - int getType() const override A_WARN_UNUSED + int getType() const override final A_WARN_UNUSED { return DATA_STRING; } private: @@ -88,7 +88,7 @@ class FloatData final : public VariableData double getData() const A_WARN_UNUSED { return mData; } - int getType() const override A_WARN_UNUSED + int getType() const override final A_WARN_UNUSED { return DATA_FLOAT; } private: @@ -105,7 +105,7 @@ class BoolData final : public VariableData bool getData() const A_WARN_UNUSED { return mData; } - int getType() const override A_WARN_UNUSED + int getType() const override final A_WARN_UNUSED { return DATA_BOOL; } private: -- cgit v1.2.3-60-g2f50