summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-10 15:31:36 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-10 15:31:36 +0300
commitc757bf80478dd5e4e40a6c24b436954ab498a855 (patch)
tree8b73b31f6ca857d3a7affb86e324990b70baf68a /src/gui/windows/charselectdialog.cpp
parenta7524c70c71cbdaed7e541105d9c743fb18f56cf (diff)
downloadmanaplus-c757bf80478dd5e4e40a6c24b436954ab498a855.tar.gz
manaplus-c757bf80478dd5e4e40a6c24b436954ab498a855.tar.bz2
manaplus-c757bf80478dd5e4e40a6c24b436954ab498a855.tar.xz
manaplus-c757bf80478dd5e4e40a6c24b436954ab498a855.zip
Fix code style.
Diffstat (limited to 'src/gui/windows/charselectdialog.cpp')
-rw-r--r--src/gui/windows/charselectdialog.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 5ec3ab2b7..fef43b605 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -26,8 +26,6 @@
#include "configuration.h"
#include "units.h"
-#include "events/keyevent.h"
-
#include "input/inputaction.h"
#include "being/attributes.h"
@@ -234,7 +232,7 @@ void CharSelectDialog::action(const ActionEvent &event)
else if (eventId == "rename"
&& mCharacterEntries[selected]->getCharacter())
{
- LocalPlayer *const player = mCharacterEntries[
+ const LocalPlayer *const player = mCharacterEntries[
selected]->getCharacter()->dummy;
EditDialog *const dialog = new EditDialog(
_("Please enter new name"), player->getName(), "OK");
@@ -525,8 +523,7 @@ void CharSelectDialog::setLocked(const bool locked)
mUnregisterButton->setEnabled(!locked);
if (mChangeEmailButton)
mChangeEmailButton->setEnabled(!locked);
- if (mPlayButton)
- mPlayButton->setEnabled(!locked);
+ mPlayButton->setEnabled(!locked);
if (mDeleteButton)
mDeleteButton->setEnabled(!locked);
@@ -575,8 +572,7 @@ void CharSelectDialog::close()
void CharSelectDialog::widgetResized(const Event &event)
{
Window::widgetResized(event);
- if (mCharacterView)
- mCharacterView->resize();
+ mCharacterView->resize();
}
void CharSelectDialog::updateState()
@@ -594,7 +590,7 @@ void CharSelectDialog::updateState()
// TRANSLATORS: char select dialog. button.
mPlayButton->setCaption(_("Play"));
- LocalPlayer *const player = mCharacterEntries[
+ const LocalPlayer *const player = mCharacterEntries[
idx]->getCharacter()->dummy;
if (player && mRenameButton)
mRenameButton->setEnabled(player->getRename() ? true : false);