diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-12-15 18:31:07 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-12-15 18:31:07 +0100 |
commit | 0fbfd04fe113e448ada74af6e8e028d089113afc (patch) | |
tree | b59692830b9696c8ae5e06cc74a77e663c53197e /src/gui | |
parent | d92eb6c97f7b148b0b3b390bb93ea89179b614c8 (diff) | |
download | mana-client-0fbfd04fe113e448ada74af6e8e028d089113afc.tar.gz mana-client-0fbfd04fe113e448ada74af6e8e028d089113afc.tar.bz2 mana-client-0fbfd04fe113e448ada74af6e8e028d089113afc.tar.xz mana-client-0fbfd04fe113e448ada74af6e8e028d089113afc.zip |
Small hacking cleanups.
In preparation for resolution of mana-issue: #211.
Trivial.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/charselectdialog.cpp | 18 | ||||
-rw-r--r-- | src/gui/widgets/playerbox.h | 3 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 1c292759..d8794afd 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -154,7 +154,8 @@ CharSelectDialog::CharSelectDialog(LoginData *loginData): place = getPlacer(0, 1); - for (int i = 0; i < MAX_CHARACTER_COUNT; i++) { + for (int i = 0; i < MAX_CHARACTER_COUNT; i++) + { mCharacterEntries[i] = new CharacterDisplay(this); place(i, 0, mCharacterEntries[i]); } @@ -191,7 +192,8 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) { attemptCharacterSelect(selected); } - else if (eventId == "new" && !mCharacterEntries[selected]->getCharacter()) + else if (eventId == "new" + && !mCharacterEntries[selected]->getCharacter()) { // Start new character dialog CharCreateDialog *charCreateDialog = @@ -268,7 +270,8 @@ void CharSelectDialog::setCharacters(const Net::Characters &characters) for (i = characters.begin(); i != i_end; ++i) { Net::Character *character = *i; - if (character->slot >= MAX_CHARACTER_COUNT) { + if (character->slot >= MAX_CHARACTER_COUNT) + { logger->log("Warning: slot out of range: %d", character->slot); continue; } @@ -309,9 +312,12 @@ bool CharSelectDialog::selectByName(const std::string &name, if (mLocked) return false; - for (int i = 0; i < MAX_CHARACTER_COUNT; ++i) { - if (Net::Character *character = mCharacterEntries[i]->getCharacter()) { - if (character->dummy->getName() == name) { + for (int i = 0; i < MAX_CHARACTER_COUNT; ++i) + { + if (Net::Character *character = mCharacterEntries[i]->getCharacter()) + { + if (character->dummy->getName() == name) + { mCharacterEntries[i]->requestFocus(); if (action == Choose) attemptCharacterSelect(i); diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h index 4505367f..4ce6782d 100644 --- a/src/gui/widgets/playerbox.h +++ b/src/gui/widgets/playerbox.h @@ -51,7 +51,8 @@ class PlayerBox : public gcn::ScrollArea * player to <code>NULL</code> causes the box not to draw any * character. */ - void setPlayer(const Being *being) { mBeing = being; } + void setPlayer(const Being *being) + { mBeing = being; } /** * Draws the scroll area. |