summaryrefslogtreecommitdiff
path: root/src/gui/windows/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-30 00:07:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-30 00:07:54 +0300
commita93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (patch)
tree2d85d112997176e9ab765e638b0e7f2e16677b83 /src/gui/windows/charcreatedialog.cpp
parent5c83a96b8ad85ad0562542b9720a0df6c5fb550c (diff)
parent8983700f6c8cc6496626ed3af235e1ec31fe5501 (diff)
downloadmanaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.gz
manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.bz2
manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.tar.xz
manaverse-a93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/windows/charcreatedialog.cpp')
-rw-r--r--src/gui/windows/charcreatedialog.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 1df282189..42bbb4b88 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -313,8 +313,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
CharCreateDialog::~CharCreateDialog()
{
- delete mPlayer;
- mPlayer = nullptr;
+ delete2(mPlayer);
if (Net::getCharServerHandler())
Net::getCharServerHandler()->setCharCreateDialog(nullptr);
@@ -491,14 +490,11 @@ void CharCreateDialog::setAttributes(const StringVect &labels,
for (unsigned i = 0; i < mAttributeLabel.size(); i++)
{
remove(mAttributeLabel[i]);
- delete mAttributeLabel[i];
- mAttributeLabel[i] = nullptr;
+ delete2(mAttributeLabel[i])
remove(mAttributeSlider[i]);
- delete mAttributeSlider[i];
- mAttributeSlider[i] = nullptr;
+ delete2(mAttributeSlider[i])
remove(mAttributeValue[i]);
- delete mAttributeValue[i];
- mAttributeValue[i] = nullptr;
+ delete2(mAttributeValue[i])
}
mAttributeLabel.resize(labels.size());
@@ -655,13 +651,13 @@ void CharCreateDialog::updatePlayer()
}
}
-void CharCreateDialog::keyPressed(KeyEvent &keyEvent)
+void CharCreateDialog::keyPressed(KeyEvent &event)
{
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
switch (actionId)
{
case Input::KEY_GUI_CANCEL:
- keyEvent.consume();
+ event.consume();
action(ActionEvent(mCancelButton,
mCancelButton->getActionEventId()));
break;