summaryrefslogtreecommitdiff
path: root/src/actorspritemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-23 02:46:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-23 02:48:43 +0300
commita69a87c5a81ddbf25a25c5549259da550d207bda (patch)
tree59f1a919b327912395ab84bab1684118bf0379be /src/actorspritemanager.cpp
parente646f2fae3f323b7faa26aa9540524d1765211ee (diff)
downloadmanaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.zip
Improve a bit iterators again.
Diffstat (limited to 'src/actorspritemanager.cpp')
-rw-r--r--src/actorspritemanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index ecadc4b67..a85d2cd49 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -51,8 +51,8 @@
#include "debug.h"
-#define for_actors ActorSpritesConstIterator it, it_end; \
-for (it = mActors.begin(), it_end = mActors.end() ; it != it_end; ++it)
+#define for_actors for (ActorSpritesConstIterator it = mActors.begin(), \
+ it_end = mActors.end() ; it != it_end; ++it)
class FindBeingFunctor
{
@@ -749,7 +749,8 @@ void ActorSpriteManager::logic()
if (mDeleteActors.empty())
return;
- for (it = mDeleteActors.begin(), it_end = mDeleteActors.end();
+ for (ActorSpritesConstIterator it = mDeleteActors.begin(),
+ it_end = mDeleteActors.end();
it != it_end; ++it)
{
if (!*it)
@@ -773,7 +774,8 @@ void ActorSpriteManager::logic()
viewport->clearHover(*it);
}
- for (it = mDeleteActors.begin(), it_end = mDeleteActors.end();
+ for (ActorSpritesConstIterator it = mDeleteActors.begin(),
+ it_end = mDeleteActors.end();
it != it_end; ++it)
{
mActors.erase(*it);