diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-17 16:34:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-17 16:34:36 +0300 |
commit | c6c4eef4e49bb4de90845408af9f642a1a4e224b (patch) | |
tree | 81d192e85b3c075cb2e52671bea4c3c0499dc3f2 /src/gui/charselectdialog.cpp | |
parent | 093e392dd84c920d26bca17d48ac6611393d087c (diff) | |
download | manaverse-c6c4eef4e49bb4de90845408af9f642a1a4e224b.tar.gz manaverse-c6c4eef4e49bb4de90845408af9f642a1a4e224b.tar.bz2 manaverse-c6c4eef4e49bb4de90845408af9f642a1a4e224b.tar.xz manaverse-c6c4eef4e49bb4de90845408af9f642a1a4e224b.zip |
Improve size calculations.
Diffstat (limited to 'src/gui/charselectdialog.cpp')
-rw-r--r-- | src/gui/charselectdialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index e0ae9e85f..77c8ea55d 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -211,7 +211,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) // Check if a button of a character was pressed const gcn::Widget *sourceParent = event.getSource()->getParent(); int selected = -1; - for (int i = 0; i < static_cast<int>(mCharacterEntries.size()); ++i) + for (size_t i = 0, sz = mCharacterEntries.size(); i < sz; ++i) { if (mCharacterEntries[i] == sourceParent) { @@ -515,7 +515,7 @@ void CharSelectDialog::setLocked(bool locked) if (mChangeEmailButton) mChangeEmailButton->setEnabled(!locked); - for (int i = 0; i < static_cast<int>(mCharacterEntries.size()); ++i) + for (size_t i = 0, sz = mCharacterEntries.size(); i < sz; ++i) { if (mCharacterEntries[i]) mCharacterEntries[i]->setActive(!mLocked); @@ -528,7 +528,7 @@ bool CharSelectDialog::selectByName(const std::string &name, if (mLocked) return false; - for (int i = 0; i < static_cast<int>(mCharacterEntries.size()); ++i) + for (size_t i = 0, sz = mCharacterEntries.size(); i < sz; ++i) { if (mCharacterEntries[i]) { |