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/widgets/tabs/setup_input.cpp | |
parent | 47cc515695fcd0b16467506e4984d2ec38fad4e4 (diff) | |
download | manaplus-0c35dab0ba366f85b40ef1795125521f1df8c264.tar.gz manaplus-0c35dab0ba366f85b40ef1795125521f1df8c264.tar.bz2 manaplus-0c35dab0ba366f85b40ef1795125521f1df8c264.tar.xz manaplus-0c35dab0ba366f85b40ef1795125521f1df8c264.zip |
simplify variables cleanup.
Diffstat (limited to 'src/gui/widgets/tabs/setup_input.cpp')
-rw-r--r-- | src/gui/widgets/tabs/setup_input.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index b04937881..a29e0d797 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -41,6 +41,8 @@ #include "gui/models/listmodel.h" +#include "utils/delete2.h" + #include "debug.h" static int selectedData = 0; @@ -169,21 +171,14 @@ Setup_Input::Setup_Input(const Widget2 *const widget) : Setup_Input::~Setup_Input() { - delete mKeyList; - mKeyList = nullptr; - delete mKeyListModel; - mKeyListModel = nullptr; - - delete mAssignKeyButton; - mAssignKeyButton = nullptr; - delete mUnassignKeyButton; - mUnassignKeyButton = nullptr; - delete mResetKeysButton; - mResetKeysButton = nullptr; + delete2(mKeyList); + delete2(mKeyListModel); + delete2(mAssignKeyButton); + delete2(mUnassignKeyButton); + delete2(mResetKeysButton); delete [] mActionDataSize; mActionDataSize = nullptr; - delete mScrollArea; - mScrollArea = nullptr; + delete2(mScrollArea); } void Setup_Input::apply() |