diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-28 00:39:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-28 11:04:23 +0300 |
commit | 0c35dab0ba366f85b40ef1795125521f1df8c264 (patch) | |
tree | dde6abde3288f543ae96a2468b2275af8a03e704 /src/gui/gui.cpp | |
parent | 47cc515695fcd0b16467506e4984d2ec38fad4e4 (diff) | |
download | manaverse-0c35dab0ba366f85b40ef1795125521f1df8c264.tar.gz manaverse-0c35dab0ba366f85b40ef1795125521f1df8c264.tar.bz2 manaverse-0c35dab0ba366f85b40ef1795125521f1df8c264.tar.xz manaverse-0c35dab0ba366f85b40ef1795125521f1df8c264.zip |
simplify variables cleanup.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 761810c1a..9a50583b9 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -95,6 +95,7 @@ #include "resources/imageset.h" #include "resources/resourcemanager.h" +#include "utils/delete2.h" #include "utils/langs.h" #include "utils/timer.h" @@ -290,8 +291,7 @@ void Gui::postInit(Graphics *const graphics) Gui::~Gui() { config.removeListeners(mConfigListener); - delete mConfigListener; - mConfigListener = nullptr; + delete2(mConfigListener); if (mMouseCursors) { @@ -299,31 +299,22 @@ Gui::~Gui() mMouseCursors = nullptr; } - delete mGuiFont; - mGuiFont = nullptr; - delete boldFont; - boldFont = nullptr; - delete mHelpFont; - mHelpFont = nullptr; - delete mSecureFont; - mSecureFont = nullptr; - delete mInfoParticleFont; - mInfoParticleFont = nullptr; - delete mNpcFont; - mNpcFont = nullptr; + delete2(mGuiFont); + delete2(boldFont); + delete2(mHelpFont); + delete2(mSecureFont); + delete2(mInfoParticleFont); + delete2(mNpcFont); delete getTop(); - delete guiInput; - guiInput = nullptr; + delete2(guiInput); - delete theme; - theme = nullptr; + delete2(theme); if (Widget::widgetExists(mTop)) setTop(nullptr); - delete mFocusHandler; - mFocusHandler = nullptr; + delete2(mFocusHandler); } void Gui::logic() |