summaryrefslogtreecommitdiff
path: root/src/gui/charselectdialog.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-15 18:31:07 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-15 18:31:07 +0100
commit0fbfd04fe113e448ada74af6e8e028d089113afc (patch)
treeb59692830b9696c8ae5e06cc74a77e663c53197e /src/gui/charselectdialog.cpp
parentd92eb6c97f7b148b0b3b390bb93ea89179b614c8 (diff)
downloadmana-0fbfd04fe113e448ada74af6e8e028d089113afc.tar.gz
mana-0fbfd04fe113e448ada74af6e8e028d089113afc.tar.bz2
mana-0fbfd04fe113e448ada74af6e8e028d089113afc.tar.xz
mana-0fbfd04fe113e448ada74af6e8e028d089113afc.zip
Small hacking cleanups.
In preparation for resolution of mana-issue: #211. Trivial.
Diffstat (limited to 'src/gui/charselectdialog.cpp')
-rw-r--r--src/gui/charselectdialog.cpp18
1 files changed, 12 insertions, 6 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);