diff options
author | Socapex <philippe_groarke@yahoo.ca> | 2013-01-19 21:02:01 -0500 |
---|---|---|
committer | Socapex <philippe_groarke@yahoo.ca> | 2013-01-19 21:02:01 -0500 |
commit | df606ace309acaf0c78f52e1f98eabed6c844ae2 (patch) | |
tree | d9799b0e4a507d9eacbbafc1755eecea03f0b373 /src/actorspritemanager.cpp | |
parent | d0169223b889a115b486e974e5b287c3ccb00d85 (diff) | |
parent | 678d4e70999ade5a36862039875aa5564291d09d (diff) | |
download | plus-df606ace309acaf0c78f52e1f98eabed6c844ae2.tar.gz plus-df606ace309acaf0c78f52e1f98eabed6c844ae2.tar.bz2 plus-df606ace309acaf0c78f52e1f98eabed6c844ae2.tar.xz plus-df606ace309acaf0c78f52e1f98eabed6c844ae2.zip |
Merge remote-tracking branch 'upstream/master' into osx
Diffstat (limited to 'src/actorspritemanager.cpp')
-rw-r--r-- | src/actorspritemanager.cpp | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp index 4ccb2e347..94ec49f8e 100644 --- a/src/actorspritemanager.cpp +++ b/src/actorspritemanager.cpp @@ -2,7 +2,7 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2012 The ManaPlus Developers + * Copyright (C) 2011-2013 The ManaPlus Developers * * This file is part of The ManaPlus Client. * @@ -273,10 +273,7 @@ void ActorSpriteManager::undelete(const ActorSprite *const actor) if (!actor || actor == player_node) return; - ActorSpritesConstIterator it, it_end; - - for (it = mDeleteActors.begin(), it_end = mDeleteActors.end(); - it != it_end; ++it) + FOR_EACH (ActorSpritesConstIterator, it, mDeleteActors) { if (*it == actor) { @@ -760,9 +757,7 @@ void ActorSpriteManager::logic() } BLOCK_START("ActorSpriteManager::logic 1") - for (ActorSpritesConstIterator it = mDeleteActors.begin(), - it_end = mDeleteActors.end(); - it != it_end; ++it) + FOR_EACH (ActorSpritesConstIterator, it, mDeleteActors) { if (!*it) continue; @@ -785,9 +780,7 @@ void ActorSpriteManager::logic() viewport->clearHover(*it); } - for (ActorSpritesConstIterator it = mDeleteActors.begin(), - it_end = mDeleteActors.end(); - it != it_end; ++it) + FOR_EACH (ActorSpritesConstIterator, it, mDeleteActors) { mActors.erase(*it); delete *it; @@ -906,9 +899,7 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const { std::vector<Being*> sortedBeings; - for (ActorSprites::const_iterator i = mActors.begin(), - i_end = mActors.end(); - i != i_end; ++i) + FOR_EACH (ActorSprites::const_iterator, i, mActors) { if (!*i) continue; @@ -1003,9 +994,7 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const int index = defaultPriorityIndex; Being *closestBeing = nullptr; - for (ActorSprites::const_iterator i = mActors.begin(), - i_end = mActors.end(); - i != i_end; ++i) + FOR_EACH (ActorSprites::const_iterator, i, mActors) { if (!*i) continue; @@ -1294,9 +1283,7 @@ void ActorSpriteManager::printBeingsToChat(ActorSprites beings, debugChatTab->chatLog("---------------------------------------"); debugChatTab->chatLog(header); - std::set<ActorSprite*>::const_iterator it; - const std::set<ActorSprite*>::const_iterator it_end = beings.end(); - for (it = beings.begin(); it != it_end; ++it) + FOR_EACH (std::set<ActorSprite*>::const_iterator, it, beings) { if (!*it) continue; @@ -1323,9 +1310,7 @@ void ActorSpriteManager::printBeingsToChat(std::vector<Being*> beings, debugChatTab->chatLog("---------------------------------------"); debugChatTab->chatLog(header); - std::vector<Being*>::const_iterator i; - const std::vector<Being*>::const_iterator i_end = beings.end(); - for (i = beings.begin(); i != i_end; ++i) + FOR_EACH (std::vector<Being*>::const_iterator, i, beings) { if (!*i) continue; |