From 0c35dab0ba366f85b40ef1795125521f1df8c264 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Mar 2014 00:39:12 +0300 Subject: simplify variables cleanup. --- src/gui/widgets/tabs/setup_input.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/gui/widgets/tabs/setup_input.cpp') 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() -- cgit v1.2.3-70-g09d2