diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-02 12:26:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-02 12:26:23 +0300 |
commit | 124e28787a66fc1ae882afbb5711b08620b51563 (patch) | |
tree | 5f172652494234e6caae74cf04a2cd4d0083cbf0 /src | |
parent | 48746ecb8cd94270f143cc7d722188d2e77c3101 (diff) | |
download | manaverse-124e28787a66fc1ae882afbb5711b08620b51563.tar.gz manaverse-124e28787a66fc1ae882afbb5711b08620b51563.tar.bz2 manaverse-124e28787a66fc1ae882afbb5711b08620b51563.tar.xz manaverse-124e28787a66fc1ae882afbb5711b08620b51563.zip |
Remove useless virtual keywords.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/actorsprite.h | 8 | ||||
-rw-r--r-- | src/being/being.h | 8 | ||||
-rw-r--r-- | src/being/compoundsprite.h | 23 | ||||
-rw-r--r-- | src/gui/models/colormodel.h | 4 | ||||
-rw-r--r-- | src/gui/models/extendednamesmodel.h | 6 | ||||
-rw-r--r-- | src/gui/models/namesmodel.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/basiccontainer.h | 19 | ||||
-rw-r--r-- | src/gui/widgets/popup.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/setupitem.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/shortcutcontainer.h | 12 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setuptabscroll.h | 11 | ||||
-rw-r--r-- | src/gui/widgets/textfield.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 6 | ||||
-rw-r--r-- | src/net/ea/adminhandler.h | 10 | ||||
-rw-r--r-- | src/net/ea/charserverhandler.h | 14 | ||||
-rw-r--r-- | src/net/ea/gamehandler.h | 10 | ||||
-rw-r--r-- | src/net/ea/loginhandler.h | 34 | ||||
-rw-r--r-- | src/particle/imageparticle.h | 2 | ||||
-rw-r--r-- | src/particle/particle.h | 6 | ||||
-rw-r--r-- | src/render/modernopenglgraphics.h | 2 |
21 files changed, 92 insertions, 97 deletions
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index c633e8119..12af84cda 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -130,16 +130,16 @@ class ActorSprite notfinal : public CompoundSprite, public Actor */ void setStatusEffectBlock(const int offset, const uint16_t flags); - virtual void setAlpha(const float alpha) override final + void setAlpha(const float alpha) override final { CompoundSprite::setAlpha(alpha); } - virtual float getAlpha() const override final A_WARN_UNUSED + float getAlpha() const override final A_WARN_UNUSED { return CompoundSprite::getAlpha(); } - virtual int getWidth() const override A_WARN_UNUSED + int getWidth() const override A_WARN_UNUSED { return CompoundSprite::getWidth(); } - virtual int getHeight() const override A_WARN_UNUSED + int getHeight() const override A_WARN_UNUSED { return CompoundSprite::getHeight(); } static void load(); diff --git a/src/being/being.h b/src/being/being.h index 06f957d61..1dc44b986 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -357,7 +357,7 @@ class Being notfinal : public ActorSprite, /** * Performs being logic. */ - virtual void logic() override; + void logic() override; void petLogic(); @@ -501,13 +501,13 @@ class Being notfinal : public ActorSprite, /** * Returns the horizontal size of the current base sprite of the being. */ - virtual int getWidth() const override final A_WARN_UNUSED + int getWidth() const override final A_WARN_UNUSED { return std::max(CompoundSprite::getWidth(), DEFAULT_BEING_WIDTH); } /** * Returns the vertical size of the current base sprite of the being. */ - virtual int getHeight() const override final A_WARN_UNUSED + int getHeight() const override final A_WARN_UNUSED { return std::max(CompoundSprite::getHeight(), DEFAULT_BEING_HEIGHT); } /** @@ -556,7 +556,7 @@ class Being notfinal : public ActorSprite, static void load(); - virtual void optionChanged(const std::string &value) override; + void optionChanged(const std::string &value) override; void flashName(const int time); diff --git a/src/being/compoundsprite.h b/src/being/compoundsprite.h index 4017e3038..3e48ffdf7 100644 --- a/src/being/compoundsprite.h +++ b/src/being/compoundsprite.h @@ -44,29 +44,30 @@ class CompoundSprite notfinal : public Sprite virtual ~CompoundSprite(); - virtual bool reset() override final; + bool reset() override final; - virtual bool play(const std::string &action) override final; + bool play(const std::string &action) override final; - virtual bool update(const int time) override final; + bool update(const int time) override final; - virtual void draw(Graphics *const graphics, - const int posX, const int posY) const override; + void draw(Graphics *const graphics, + const int posX, + const int posY) const override; /** * Gets the width in pixels of the first sprite in the list. */ - virtual int getWidth() const override A_WARN_UNUSED; + int getWidth() const override A_WARN_UNUSED; /** * Gets the height in pixels of the first sprite in the list. */ - virtual int getHeight() const override A_WARN_UNUSED; + int getHeight() const override A_WARN_UNUSED; - virtual const Image *getImage() const override final A_WARN_UNUSED; + const Image *getImage() const override final A_WARN_UNUSED; - virtual bool setSpriteDirection(const SpriteDirection::Type direction) - override final; + bool setSpriteDirection(const SpriteDirection::Type direction) + override final; int getNumberOfLayers() const A_WARN_UNUSED; @@ -111,7 +112,7 @@ class CompoundSprite notfinal : public Sprite */ virtual unsigned int getFrameCount(unsigned int layer) A_WARN_UNUSED; - virtual void setAlpha(float alpha) override; + void setAlpha(float alpha) override; bool updateNumber(const unsigned num) override final; diff --git a/src/gui/models/colormodel.h b/src/gui/models/colormodel.h index 786e2330a..81d8d8cbe 100644 --- a/src/gui/models/colormodel.h +++ b/src/gui/models/colormodel.h @@ -41,9 +41,9 @@ class ColorModel final : public ListModel virtual ~ColorModel(); - virtual int getNumberOfElements() override final A_WARN_UNUSED; + int getNumberOfElements() override final A_WARN_UNUSED; - virtual std::string getElementAt(int i) override final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; virtual const ColorPair *getColorAt(const int i) const A_WARN_UNUSED; diff --git a/src/gui/models/extendednamesmodel.h b/src/gui/models/extendednamesmodel.h index d0ff7aab0..76f30bf8f 100644 --- a/src/gui/models/extendednamesmodel.h +++ b/src/gui/models/extendednamesmodel.h @@ -34,11 +34,11 @@ class ExtendedNamesModel notfinal : public ExtendedListModel virtual ~ExtendedNamesModel(); - virtual int getNumberOfElements() override final A_WARN_UNUSED; + int getNumberOfElements() override final A_WARN_UNUSED; - virtual std::string getElementAt(int i) override final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; - virtual const Image *getImageAt(int i) override final A_WARN_UNUSED; + const Image *getImageAt(int i) override final A_WARN_UNUSED; StringVect &getNames() A_WARN_UNUSED { return mNames; } diff --git a/src/gui/models/namesmodel.h b/src/gui/models/namesmodel.h index f4bffbdf7..096998992 100644 --- a/src/gui/models/namesmodel.h +++ b/src/gui/models/namesmodel.h @@ -36,9 +36,9 @@ class NamesModel notfinal : public ListModel virtual ~NamesModel(); - virtual int getNumberOfElements() override final A_WARN_UNUSED; + int getNumberOfElements() override final A_WARN_UNUSED; - virtual std::string getElementAt(int i) override final A_WARN_UNUSED; + std::string getElementAt(int i) override final A_WARN_UNUSED; StringVect &getNames() A_WARN_UNUSED { return mNames; } diff --git a/src/gui/widgets/basiccontainer.h b/src/gui/widgets/basiccontainer.h index eaa354f6e..2888950b8 100644 --- a/src/gui/widgets/basiccontainer.h +++ b/src/gui/widgets/basiccontainer.h @@ -109,28 +109,27 @@ class BasicContainer notfinal : public Widget, // Inherited from Widget - virtual void moveToTop(Widget* widget) override; + void moveToTop(Widget* widget) override; - virtual void moveToBottom(Widget* widget) override; + void moveToBottom(Widget* widget) override; - virtual Rect getChildrenArea() override A_WARN_UNUSED; + Rect getChildrenArea() override A_WARN_UNUSED; - virtual void focusNext() override; + void focusNext() override; - virtual void focusPrevious() override; + void focusPrevious() override; - virtual void logic() override; + void logic() override; - virtual void setFocusHandler(FocusHandler *const focusHandler) - override; + void setFocusHandler(FocusHandler *const focusHandler) override; void setInternalFocusHandler(FocusHandler* focusHandler); - virtual Widget *getWidgetAt(int x, int y) override A_WARN_UNUSED; + Widget *getWidgetAt(int x, int y) override A_WARN_UNUSED; // Inherited from WidgetDeathListener - virtual void death(const Event& event) override; + void death(const Event& event) override; Widget *findFirstWidget(const std::set<Widget*> &list); diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index 4e0222775..a375a90c7 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -152,7 +152,7 @@ class Popup notfinal : public Container, // Inherited from BasicContainer - virtual Rect getChildrenArea() override; + Rect getChildrenArea() override; /** * Sets the location to display the popup. Tries to horizontally center diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 4fbb81e23..bc6443bb3 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -75,7 +75,7 @@ class SetupItem notfinal : public ActionListener, virtual std::string getActionEventId() const A_WARN_UNUSED; - virtual void action(const ActionEvent &event) override; + void action(const ActionEvent &event) override; virtual void doAction(); @@ -474,7 +474,7 @@ class SetupItemSliderList notfinal : public SetupItem void toWidget() override; - virtual void action(const ActionEvent &event) override; + void action(const ActionEvent &event) override; void apply(const std::string &eventName) override final; diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index d7870490f..e10d91f3c 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -51,34 +51,34 @@ class ShortcutContainer notfinal : public Widget, /** * Draws the shortcuts */ - virtual void draw(Graphics *graphics) override = 0; + void draw(Graphics *graphics) override = 0; /** * Invoked when a widget changes its size. This is used to determine * the new height of the container. */ - virtual void widgetResized(const Event &event) override final; + void widgetResized(const Event &event) override final; - virtual void widgetMoved(const Event& event) override final; + void widgetMoved(const Event& event) override final; /** * Handles mouse when dragged. */ - virtual void mouseDragged(MouseEvent &event A_UNUSED) override + void mouseDragged(MouseEvent &event A_UNUSED) override { } /** * Handles mouse when pressed. */ - virtual void mousePressed(MouseEvent &event A_UNUSED) override + void mousePressed(MouseEvent &event A_UNUSED) override { } /** * Handles mouse release. */ - virtual void mouseReleased(MouseEvent &event A_UNUSED) override + void mouseReleased(MouseEvent &event A_UNUSED) override { } diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h index 762158e8a..ac6129194 100644 --- a/src/gui/widgets/tabs/chat/chattab.h +++ b/src/gui/widgets/tabs/chat/chattab.h @@ -179,7 +179,7 @@ class ChatTab notfinal : public Tab friend class ChatWindow; friend class WhisperWindow; - virtual void setCurrent() override final + void setCurrent() override final { setFlash(0); } virtual void handleInput(const std::string &msg); diff --git a/src/gui/widgets/tabs/setuptabscroll.h b/src/gui/widgets/tabs/setuptabscroll.h index f701ea6ed..ae5f7bcd4 100644 --- a/src/gui/widgets/tabs/setuptabscroll.h +++ b/src/gui/widgets/tabs/setuptabscroll.h @@ -45,16 +45,15 @@ class SetupTabScroll notfinal : public SetupTab VertContainer *getContainer() const A_WARN_UNUSED { return mContainer; } - virtual void apply() override; + void apply() override; - virtual void cancel() override final; + void cancel() override final; - virtual void externalUpdated() override; + void externalUpdated() override; - virtual void externalUnloaded() override; + void externalUnloaded() override; - virtual void action(const ActionEvent &event A_UNUSED) - override final + void action(const ActionEvent &event A_UNUSED) override final { } int getPreferredFirstItemSize() const A_WARN_UNUSED diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index e7d6977c7..bb512e281 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -103,7 +103,7 @@ class TextField notfinal : public Widget, /** * Draws the text field. */ - virtual void draw(Graphics *graphics) override; + void draw(Graphics *graphics) override; /** * Update the alpha value to the graphic components. diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index dd59242e8..d04b16cdf 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -158,14 +158,14 @@ class Window notfinal : public BasicContainer2, /** * Called whenever the widget changes size. */ - virtual void widgetResized(const Event &event) override; + void widgetResized(const Event &event) override; - virtual void widgetMoved(const Event& event) override; + void widgetMoved(const Event& event) override; /** * Called whenever the widget is hidden. */ - virtual void widgetHidden(const Event &event) override; + void widgetHidden(const Event &event) override; /** * Sets whether or not the window has a close button. diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h index f1abbe736..acabd288a 100644 --- a/src/net/ea/adminhandler.h +++ b/src/net/ea/adminhandler.h @@ -46,15 +46,15 @@ class AdminHandler notfinal : public Net::AdminHandler virtual ~AdminHandler() { } - virtual void kickName(const std::string &name) const override final; + void kickName(const std::string &name) const override final; - virtual void ban(const int playerId) const override final; + void ban(const int playerId) const override final; - virtual void banName(const std::string &name) const override final; + void banName(const std::string &name) const override final; - virtual void unban(const int playerId) const override final; + void unban(const int playerId) const override final; - virtual void unbanName(const std::string &name) const override final; + void unbanName(const std::string &name) const override final; void reviveName(const std::string &name) const override final; diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h index 305fee0ee..99fb84c35 100644 --- a/src/net/ea/charserverhandler.h +++ b/src/net/ea/charserverhandler.h @@ -41,16 +41,16 @@ class CharServerHandler notfinal : public Net::CharServerHandler public: A_DELETE_COPY(CharServerHandler) - virtual void setCharSelectDialog(CharSelectDialog *const window) - override final; + void setCharSelectDialog(CharSelectDialog *const window) + override final; - virtual void requestCharacters() override final; + void requestCharacters() override final; - virtual unsigned int baseSprite() const override final A_WARN_UNUSED; + unsigned int baseSprite() const override final A_WARN_UNUSED; - virtual unsigned int hairSprite() const override final A_WARN_UNUSED; + unsigned int hairSprite() const override final A_WARN_UNUSED; - virtual unsigned int maxSprite() const override final A_WARN_UNUSED; + unsigned int maxSprite() const override final A_WARN_UNUSED; virtual void connect() = 0; @@ -60,7 +60,7 @@ class CharServerHandler notfinal : public Net::CharServerHandler static void processCharDelete(Net::MessageIn &msg); - virtual void clear() override final; + void clear() override final; protected: CharServerHandler(); diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index ee3bb9f6c..4ecc85692 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -40,14 +40,14 @@ class GameHandler notfinal : public Net::GameHandler A_DELETE_COPY(GameHandler) - virtual void who() const override final; + void who() const override final; - virtual bool removeDeadBeings() const override final A_WARN_UNUSED + bool removeDeadBeings() const override final A_WARN_UNUSED { return true; } virtual void setMap(const std::string &map); - virtual bool canUseMagicBar() const override final A_WARN_UNUSED + bool canUseMagicBar() const override final A_WARN_UNUSED { return true; } static void processWhoAnswer(Net::MessageIn &msg); @@ -56,9 +56,9 @@ class GameHandler notfinal : public Net::GameHandler static void processMapQuitResponse(Net::MessageIn &msg); - virtual void clear() override final; + void clear() override final; - virtual void initEngines() const override final; + void initEngines() const override final; protected: static std::string mMap; diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index b2d57574d..1dbf97b1c 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -49,41 +49,37 @@ class LoginHandler notfinal : public Net::LoginHandler int supportedOptionalActions() const override A_WARN_UNUSED { return Net::RegistrationOptions::SetGenderOnRegister; } - virtual bool isRegistrationEnabled() const - override final A_WARN_UNUSED; + bool isRegistrationEnabled() const override final A_WARN_UNUSED; - virtual void getRegistrationDetails() const override final; + void getRegistrationDetails() const override final; - virtual unsigned int getMaxPasswordLength() const - override A_WARN_UNUSED + unsigned int getMaxPasswordLength() const override A_WARN_UNUSED { return 24; } - virtual void loginAccount(LoginData *const loginData) - const override final; + void loginAccount(LoginData *const loginData) const override final; - virtual void chooseServer(const unsigned int server, - const bool persistentIp) const override; + void chooseServer(const unsigned int server, + const bool persistentIp) const override; - virtual void registerAccount(const LoginData *const loginData) - const override final; + void registerAccount(const LoginData *const loginData) + const override final; - virtual const Worlds &getWorlds() const override final A_WARN_UNUSED; + const Worlds &getWorlds() const override final A_WARN_UNUSED; - virtual void clearWorlds() override final; + void clearWorlds() override final; virtual ServerInfo *getCharServer() const A_WARN_UNUSED = 0; const Token &getToken() const A_WARN_UNUSED { return mToken; } - virtual void logout() const override final; + void logout() const override final; - virtual void changeEmail(const std::string &email) - const override final; + void changeEmail(const std::string &email) const override final; - virtual void unregisterAccount(const std::string &username, - const std::string &password) - const override final; + void unregisterAccount(const std::string &username, + const std::string &password) + const override final; static void processUpdateHost(Net::MessageIn &msg); diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h index a2fadde7a..ecae08c37 100644 --- a/src/particle/imageparticle.h +++ b/src/particle/imageparticle.h @@ -57,7 +57,7 @@ class ImageParticle notfinal : public Particle const int offsetX, const int offsetY) const override final; - virtual void setAlpha(const float alpha) override final + void setAlpha(const float alpha) override final { mAlpha = alpha; } static StringIntMap imageParticleCountByName; diff --git a/src/particle/particle.h b/src/particle/particle.h index 9925a40a9..ad141ffc7 100644 --- a/src/particle/particle.h +++ b/src/particle/particle.h @@ -100,13 +100,13 @@ class Particle notfinal : public Actor /** * Necessary for sorting with the other sprites. */ - virtual int getPixelY() const override A_WARN_UNUSED + int getPixelY() const override A_WARN_UNUSED { return static_cast<int>(mPos.y) - 16; } /** * Necessary for sorting with the other sprites for sorting only. */ - virtual int getSortPixelY() const override A_WARN_UNUSED + int getSortPixelY() const override A_WARN_UNUSED { return static_cast<int>(mPos.y) - 16; } /** @@ -274,7 +274,7 @@ class Particle notfinal : public Actor float getAlpha() const override final { return 1.0F; } - virtual void setAlpha(const float alpha A_UNUSED) override + void setAlpha(const float alpha A_UNUSED) override { } virtual void setDeathEffect(const std::string &effectFile, diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index db20aa2fb..6604e3361 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -72,7 +72,7 @@ class ModernOpenGLGraphics final : public Graphics void removeArray(const uint32_t id, uint32_t *const arr) override final; - virtual void createGLContext() override final; + void createGLContext() override final; #include "render/graphicsdef.hpp" |