summaryrefslogtreecommitdiff
path: root/src/gui/setup.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/setup.cpp
parent3f84fc198131ff706e18c56f612e38ff147b0005 (diff)
downloadplus-b3f70d8d46199524edc590269a73c262899763c7.tar.gz
plus-b3f70d8d46199524edc590269a73c262899763c7.tar.bz2
plus-b3f70d8d46199524edc590269a73c262899763c7.tar.xz
plus-b3f70d8d46199524edc590269a73c262899763c7.zip
Replace most iterator to const_iterator.
Some other minor changes.
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 76e3936c2..113dd9081 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -103,7 +103,8 @@ Setup::Setup():
mTabs.push_back(new Setup_Theme);
mTabs.push_back(new Setup_Other);
- for (std::list<SetupTab*>::iterator i = mTabs.begin(), i_end = mTabs.end();
+ for (std::list<SetupTab*>::const_iterator i = mTabs.begin(),
+ i_end = mTabs.end();
i != i_end; ++i)
{
SetupTab *tab = *i;
@@ -162,10 +163,11 @@ void Setup::action(const gcn::ActionEvent &event)
if (!statusWindow)
return;
- for (std::list<Window*>::iterator it = mWindowsToReset.begin();
+ for (std::list<Window*>::const_iterator it = mWindowsToReset.begin();
it != mWindowsToReset.end(); ++it)
{
- (*it)->resetToDefaultSize();
+ if (*it)
+ (*it)->resetToDefaultSize();
}
}
}
@@ -177,10 +179,11 @@ void Setup::setInGame(bool inGame)
void Setup::externalUpdate()
{
- for (std::list<SetupTab*>::iterator it = mTabs.begin();
+ for (std::list<SetupTab*>::const_iterator it = mTabs.begin();
it != mTabs.end(); ++it)
{
- (*it)->externalUpdated();
+ if (*it)
+ (*it)->externalUpdated();
}
}