summaryrefslogtreecommitdiff
path: root/src/guichan
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/guichan
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/guichan')
-rw-r--r--src/guichan/focushandler.cpp6
-rw-r--r--src/guichan/gui.cpp8
-rw-r--r--src/guichan/widget.cpp2
-rw-r--r--src/guichan/widgets/window.cpp2
4 files changed, 10 insertions, 8 deletions
diff --git a/src/guichan/focushandler.cpp b/src/guichan/focushandler.cpp
index bb0378f59..367eed6b1 100644
--- a/src/guichan/focushandler.cpp
+++ b/src/guichan/focushandler.cpp
@@ -479,7 +479,8 @@ namespace gcn
= sourceWidget->_getFocusListeners();
// Send the event to all focus listeners of the widget.
- for (std::list<FocusListener*>::iterator it = focusListeners.begin();
+ for (std::list<FocusListener*>::const_iterator
+ it = focusListeners.begin();
it != focusListeners.end();
++ it)
{
@@ -495,7 +496,8 @@ namespace gcn
= sourceWidget->_getFocusListeners();
// Send the event to all focus listeners of the widget.
- for (std::list<FocusListener*>::iterator it = focusListeners.begin();
+ for (std::list<FocusListener*>::const_iterator
+ it = focusListeners.begin();
it != focusListeners.end();
++ it)
{
diff --git a/src/guichan/gui.cpp b/src/guichan/gui.cpp
index bec4c875f..0c81182ea 100644
--- a/src/guichan/gui.cpp
+++ b/src/guichan/gui.cpp
@@ -421,7 +421,7 @@ namespace gcn
// Check if the widget is present in the "widget with mouse" queue.
bool widgetIsPresentInQueue = false;
- std::deque<Widget*>::iterator iter;
+ std::deque<Widget*>::const_iterator iter;
for (iter = mWidgetWithMouseQueue.begin();
iter != mWidgetWithMouseQueue.end();
++ iter)
@@ -697,7 +697,7 @@ namespace gcn
= widget->_getMouseListeners();
// Send the event to all mouse listeners of the widget.
- for (std::list<MouseListener*>::iterator
+ for (std::list<MouseListener*>::const_iterator
it = mouseListeners.begin();
it != mouseListeners.end();
++it)
@@ -796,7 +796,7 @@ namespace gcn
= widget->_getKeyListeners();
// Send the event to all key listeners of the source widget.
- for (std::list<KeyListener*>::iterator
+ for (std::list<KeyListener*>::const_iterator
it = keyListeners.begin();
it != keyListeners.end();
++it)
@@ -936,7 +936,7 @@ namespace gcn
// Check if the widget is present in the "widget with mouse" queue.
bool widgetIsPresentInQueue = false;
- std::deque<Widget*>::iterator iter;
+ std::deque<Widget*>::const_iterator iter;
for (iter = mWidgetWithMouseQueue.begin();
iter != mWidgetWithMouseQueue.end();
++ iter)
diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp
index e2ed26508..1b2b3295b 100644
--- a/src/guichan/widget.cpp
+++ b/src/guichan/widget.cpp
@@ -470,7 +470,7 @@ namespace gcn
{
mGlobalFont = font;
- std::list<Widget*>::iterator iter;
+ std::list<Widget*>::const_iterator iter;
for (iter = mWidgets.begin(); iter != mWidgets.end(); ++iter)
{
if ((*iter)->mCurrentFont == NULL)
diff --git a/src/guichan/widgets/window.cpp b/src/guichan/widgets/window.cpp
index 7b04981c2..d0ba32f47 100644
--- a/src/guichan/widgets/window.cpp
+++ b/src/guichan/widgets/window.cpp
@@ -282,7 +282,7 @@ namespace gcn
WidgetListConstIterator it;
int w = 0, h = 0;
- for (it = mWidgets.begin(); it != mWidgets.end(); it++)
+ for (it = mWidgets.begin(); it != mWidgets.end(); ++ it)
{
if ((*it)->getX() + (*it)->getWidth() > w)
w = (*it)->getX() + (*it)->getWidth();