summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-19 15:25:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-20 17:05:57 +0300
commit48071e171de41a23197c7328ba038331a936e0eb (patch)
tree73c7ef1da8e5dd76469d75c0336d88c3371e4263 /src/actorsprite.cpp
parentd07fba228b5251862ad670e1d4f079c9456fab4b (diff)
downloadmv-48071e171de41a23197c7328ba038331a936e0eb.tar.gz
mv-48071e171de41a23197c7328ba038331a936e0eb.tar.bz2
mv-48071e171de41a23197c7328ba038331a936e0eb.tar.xz
mv-48071e171de41a23197c7328ba038331a936e0eb.zip
Replace for to FOR_EACH in some classes.
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r--src/actorsprite.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index e266180ed..b0ed43b75 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -70,8 +70,7 @@ ActorSprite::~ActorSprite()
player_node->setTarget(nullptr);
// Notify listeners of the destruction.
- for (ActorSpriteListenerIterator iter = mActorSpriteListeners.begin(),
- e = mActorSpriteListeners.end(); iter != e; ++iter)
+ FOR_EACH (ActorSpriteListenerIterator, iter, mActorSpriteListeners)
{
if (reportFalse(*iter))
(*iter)->actorSpriteDestroyed(*this);
@@ -120,8 +119,7 @@ void ActorSprite::logic()
if (mMustResetParticles)
{
mMustResetParticles = false;
- for (std::set<int>::const_iterator it = mStatusEffects.begin(),
- it_end = mStatusEffects.end(); it != it_end; ++it)
+ FOR_EACH (std::set<int>::const_iterator, it, mStatusEffects)
{
const StatusEffect *const effect
= StatusEffect::getStatusEffect(*it, true);
@@ -331,9 +329,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
{
clear();
- for (SpriteRefs it = display.sprites.begin(),
- it_end = display.sprites.end();
- it != it_end; ++it)
+ FOR_EACH (SpriteRefs, it, display.sprites)
{
if (!*it)
continue;
@@ -387,9 +383,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
//setup particle effects
if (Particle::enabled && particleEngine)
{
- for (StringVectCIter itr = display.particles.begin(),
- itr_end = display.particles.end();
- itr != itr_end; ++itr)
+ FOR_EACH (StringVectCIter, itr, display.particles)
{
Particle *const p = particleEngine->addEffect(*itr, 0, 0);
controlParticle(p);