summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-08 00:07:56 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-08 00:07:56 +0300
commitb3f70d8d46199524edc590269a73c262899763c7 (patch)
treeaf8e20371f2cc825c0b2dbe0c0e5c392a926c46d /src/gui/skilldialog.cpp
parent3f84fc198131ff706e18c56f612e38ff147b0005 (diff)
downloadmv-b3f70d8d46199524edc590269a73c262899763c7.tar.gz
mv-b3f70d8d46199524edc590269a73c262899763c7.tar.bz2
mv-b3f70d8d46199524edc590269a73c262899763c7.tar.xz
mv-b3f70d8d46199524edc590269a73c262899763c7.zip
Replace most iterator to const_iterator.
Some other minor changes.
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index bf87e804d..c2685b476 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -321,7 +321,7 @@ void SkillDialog::action(const gcn::ActionEvent &event)
std::string SkillDialog::update(int id)
{
- SkillMap::iterator i = mSkills.find(id);
+ SkillMap::const_iterator i = mSkills.find(id);
if (i != mSkills.end())
{
@@ -342,7 +342,9 @@ void SkillDialog::update()
PlayerInfo::getAttribute(SKILL_POINTS)));
mPointsLabel->adjustSize();
- for (SkillMap::iterator it = mSkills.begin(); it != mSkills.end(); ++it)
+ for (SkillMap::const_iterator it = mSkills.begin();
+ it != mSkills.end();
+ ++ it)
{
if ((*it).second && (*it).second->modifiable)
(*it).second->update();
@@ -467,7 +469,7 @@ void SkillDialog::loadSkills(const std::string &file)
bool SkillDialog::setModifiable(int id, bool modifiable)
{
- SkillMap::iterator it = mSkills.find(id);
+ SkillMap::const_iterator it = mSkills.find(id);
if (it != mSkills.end())
{
@@ -508,7 +510,9 @@ void SkillModel::updateVisibilities()
{
mVisibleSkills.clear();
- for (SkillList::iterator it = mSkills.begin(); it != mSkills.end(); ++it)
+ for (SkillList::const_iterator it = mSkills.begin();
+ it != mSkills.end();
+ ++ it)
{
if ((*it)->visible)
mVisibleSkills.push_back((*it));