From b3f70d8d46199524edc590269a73c262899763c7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Sep 2011 00:07:56 +0300 Subject: Replace most iterator to const_iterator. Some other minor changes. --- src/gui/setup.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/gui/setup.cpp') 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::iterator i = mTabs.begin(), i_end = mTabs.end(); + for (std::list::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::iterator it = mWindowsToReset.begin(); + for (std::list::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::iterator it = mTabs.begin(); + for (std::list::const_iterator it = mTabs.begin(); it != mTabs.end(); ++it) { - (*it)->externalUpdated(); + if (*it) + (*it)->externalUpdated(); } } -- cgit v1.2.3-60-g2f50