diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-26 12:42:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-26 12:42:21 +0300 |
commit | 45f77fd60f71322b288a4497dea5b583b2692613 (patch) | |
tree | 5ea3059c1125b3032fcdf6e0d7229a31b39dfc4a | |
parent | d2e744dab8c38ef56184251fe96293fa0f51fb9f (diff) | |
download | manaplus-45f77fd60f71322b288a4497dea5b583b2692613.tar.gz manaplus-45f77fd60f71322b288a4497dea5b583b2692613.tar.bz2 manaplus-45f77fd60f71322b288a4497dea5b583b2692613.tar.xz manaplus-45f77fd60f71322b288a4497dea5b583b2692613.zip |
Change destructors to virtual in all basic classes.
Also add some missing final to classes.
30 files changed, 35 insertions, 35 deletions
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index 11f427669..84b86d5ec 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -74,7 +74,7 @@ public: A_DELETE_COPY(ActorSprite) - ~ActorSprite(); + virtual ~ActorSprite(); int getId() const A_WARN_UNUSED { return mId; } diff --git a/src/being/compoundsprite.h b/src/being/compoundsprite.h index 5024f0122..d8c0cf849 100644 --- a/src/being/compoundsprite.h +++ b/src/being/compoundsprite.h @@ -57,7 +57,7 @@ public: A_DELETE_COPY(CompoundSprite) - ~CompoundSprite(); + virtual ~CompoundSprite(); virtual bool reset() override; diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index c1edb36ad..ea6954e15 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -89,10 +89,10 @@ class ServersListModel final : public gcn::ListModel * * \ingroup Interface */ -class ServerDialog : public Window, - public gcn::ActionListener, - public gcn::KeyListener, - public gcn::SelectionListener +class ServerDialog final : public Window, + public gcn::ActionListener, + public gcn::KeyListener, + public gcn::SelectionListener { public: /** diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 44b9fcd20..b8d4f0c6a 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -65,7 +65,7 @@ class AttrDisplay : public Container A_DELETE_COPY(AttrDisplay) - ~AttrDisplay(); + virtual ~AttrDisplay(); virtual std::string update(); diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h index 8722f894f..55d8f7769 100644 --- a/src/gui/widgets/chattab.h +++ b/src/gui/widgets/chattab.h @@ -63,7 +63,7 @@ class ChatTab : public Tab A_DELETE_COPY(ChatTab) - ~ChatTab(); + virtual ~ChatTab(); /** * Adds a line of text to our message list. Parameters: diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h index 27a20a7e2..fb0dfb15c 100644 --- a/src/gui/widgets/container.h +++ b/src/gui/widgets/container.h @@ -46,7 +46,7 @@ class Container : public gcn::Container, public: explicit Container(const Widget2 *const widget); - ~Container(); + virtual ~Container(); bool safeRemove(gcn::Widget *const widget); }; diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index fe6fb8ba6..909159e11 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -51,7 +51,7 @@ class ListBox : public gcn::ListBox, A_DELETE_COPY(ListBox) - ~ListBox(); + virtual ~ListBox(); /** * Draws the list box. diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index b305ed0c2..7c367586b 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -65,7 +65,7 @@ class Popup : public Container, public gcn::MouseListener, /** * Destructor. Deletes all the added widgets. */ - ~Popup(); + virtual ~Popup(); /** * Sets the window container to be used by new popups. diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 9c5cc11e3..dae7d83d9 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -59,7 +59,7 @@ class SetupItem : public gcn::ActionListener, A_DELETE_COPY(SetupItem) - ~SetupItem(); + virtual ~SetupItem(); void load(); @@ -429,7 +429,7 @@ class SetupItemSliderList : public SetupItem public: A_DELETE_COPY(SetupItemSliderList) - ~SetupItemSliderList(); + virtual ~SetupItemSliderList(); void createControls(); diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h index 6e73e7a70..8854e173e 100644 --- a/src/gui/widgets/setuptabscroll.h +++ b/src/gui/widgets/setuptabscroll.h @@ -39,7 +39,7 @@ class SetupTabScroll : public SetupTab A_DELETE_COPY(SetupTabScroll) - ~SetupTabScroll(); + virtual ~SetupTabScroll(); void addControl(SetupItem *const widget); diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index 60c1bb539..45078f870 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -48,7 +48,7 @@ class ShortcutContainer : public gcn::Widget, /** * Destructor. */ - ~ShortcutContainer(); + virtual ~ShortcutContainer(); /** * Draws the shortcuts diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index ca94cc8c8..ecd0ae494 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -49,7 +49,7 @@ class Tab : public gcn::BasicContainer, A_DELETE_COPY(Tab) - ~Tab(); + virtual ~Tab(); /** * Update the alpha value to the graphic components. diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index 1261e256d..eaecf41e7 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -54,7 +54,7 @@ class TextField : public gcn::TextField, A_DELETE_COPY(TextField) - ~TextField(); + virtual ~TextField(); /** * Draws the text field. diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index 46cc2d831..40270673a 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -70,7 +70,7 @@ class Window : public gcn::Window, /** * Destructor. Deletes all the added widgets. */ - ~Window(); + virtual ~Window(); /** * Sets the window container to be used by new windows. diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h index f5230615f..8bf9bc1eb 100644 --- a/src/net/ea/gui/guildtab.h +++ b/src/net/ea/gui/guildtab.h @@ -38,7 +38,7 @@ class GuildTab : public ChatTab, public ConfigListener A_DELETE_COPY(GuildTab) - ~GuildTab(); + virtual ~GuildTab(); bool handleCommand(const std::string &type, const std::string &args) override; diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h index 0f6613094..31e5864fd 100644 --- a/src/net/ea/gui/partytab.h +++ b/src/net/ea/gui/partytab.h @@ -38,7 +38,7 @@ class PartyTab : public ChatTab, public ConfigListener A_DELETE_COPY(PartyTab) - ~PartyTab(); + virtual ~PartyTab(); void showHelp() override; diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index 717641956..40d6bc8ae 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -37,7 +37,7 @@ class GuildHandler : public Net::GuildHandler A_DELETE_COPY(GuildHandler) - ~GuildHandler(); + virtual ~GuildHandler(); void requestAlliance(const int guildId, const int otherGuildId) const override; diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index fa255e213..d4dbbbd54 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -148,7 +148,7 @@ class InventoryHandler : public Net::InventoryHandler A_DELETE_COPY(InventoryHandler) - ~InventoryHandler(); + virtual ~InventoryHandler(); void clear(); diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index 05d819ffe..994029247 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -40,7 +40,7 @@ class LoginHandler : public Net::LoginHandler public: A_DELETE_COPY(LoginHandler) - ~LoginHandler(); + virtual ~LoginHandler(); int supportedOptionalActions() const override A_WARN_UNUSED { return SetGenderOnRegister; } diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index ced44a426..160080215 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -39,7 +39,7 @@ class PartyHandler : public Net::PartyHandler A_DELETE_COPY(PartyHandler) - ~PartyHandler(); + virtual ~PartyHandler(); void join(const int partyId) const override; diff --git a/src/net/eathena/messagehandler.h b/src/net/eathena/messagehandler.h index ade96baba..fb2178d72 100644 --- a/src/net/eathena/messagehandler.h +++ b/src/net/eathena/messagehandler.h @@ -42,7 +42,7 @@ class MessageHandler : public Net::MessageHandler A_DELETE_COPY(MessageHandler) - ~MessageHandler(); + virtual ~MessageHandler(); void setNetwork(Network *const network); diff --git a/src/net/tmwa/gui/partytab.h b/src/net/tmwa/gui/partytab.h index 7fa1e55fc..28d9f1cb7 100644 --- a/src/net/tmwa/gui/partytab.h +++ b/src/net/tmwa/gui/partytab.h @@ -31,7 +31,7 @@ namespace TmwAthena /** * A tab for a party chat channel. */ -class PartyTab : public Ea::PartyTab +class PartyTab final : public Ea::PartyTab { public: explicit PartyTab(const Widget2 *const widget); diff --git a/src/net/tmwa/messagehandler.h b/src/net/tmwa/messagehandler.h index 4cdc46119..77494d30f 100644 --- a/src/net/tmwa/messagehandler.h +++ b/src/net/tmwa/messagehandler.h @@ -42,7 +42,7 @@ class MessageHandler : public Net::MessageHandler A_DELETE_COPY(MessageHandler) - ~MessageHandler(); + virtual ~MessageHandler(); void setNetwork(Network *const network); diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h index 9217417fd..7c768525d 100644 --- a/src/particle/imageparticle.h +++ b/src/particle/imageparticle.h @@ -49,7 +49,7 @@ class ImageParticle : public Particle /** * Destructor. */ - ~ImageParticle(); + virtual ~ImageParticle(); /** * Draws the particle image diff --git a/src/particle/particle.h b/src/particle/particle.h index 4a95edd68..dd89e717e 100644 --- a/src/particle/particle.h +++ b/src/particle/particle.h @@ -84,7 +84,7 @@ class Particle : public Actor /** * Destructor. */ - ~Particle(); + virtual ~Particle(); /** * Deletes all child particles and emitters. diff --git a/src/resources/imageset.h b/src/resources/imageset.h index e8e4438b6..693e035db 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -48,7 +48,7 @@ class ImageSet : public Resource /** * Destructor. */ - ~ImageSet(); + virtual ~ImageSet(); /** * Returns the width of the images in the image set. diff --git a/src/test/testlauncher.h b/src/test/testlauncher.h index 4965e528e..76e1c68da 100644 --- a/src/test/testlauncher.h +++ b/src/test/testlauncher.h @@ -30,7 +30,7 @@ #include "localconsts.h" -class TestLauncher +class TestLauncher final { public: explicit TestLauncher(std::string test); diff --git a/src/test/testmain.h b/src/test/testmain.h index bcac222c0..1142747ed 100644 --- a/src/test/testmain.h +++ b/src/test/testmain.h @@ -31,7 +31,7 @@ #include <string> -class TestMain +class TestMain final { public: TestMain(); diff --git a/src/utils/mutex.h b/src/utils/mutex.h index 37c889e02..9bb3cfcdd 100644 --- a/src/utils/mutex.h +++ b/src/utils/mutex.h @@ -31,7 +31,7 @@ * A mutex provides mutual exclusion of access to certain data that is * accessed by multiple threads. */ -class Mutex +class Mutex final { public: Mutex(); @@ -54,7 +54,7 @@ class Mutex /** * A convenience class for locking a mutex. */ -class MutexLocker +class MutexLocker final { public: explicit MutexLocker(Mutex *mutex); diff --git a/src/utils/perfomance.h b/src/utils/perfomance.h index c3a79c722..f668988f3 100644 --- a/src/utils/perfomance.h +++ b/src/utils/perfomance.h @@ -47,7 +47,7 @@ namespace Perfomance void blockEnd(const std::string &name); - class Func + class Func final { public: explicit Func(const std::string &str) : |