From c9f43996f3147100627ee2c6f9da993ceb160113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Apr 2012 02:26:34 +0300 Subject: Improve iterators part 2. --- src/actorsprite.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/actorsprite.cpp') diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index e558e2469..e86c886e4 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -116,8 +116,8 @@ void ActorSprite::logic() if (mMustResetParticles) { mMustResetParticles = false; - for (std::set::const_iterator it = mStatusEffects.begin(); - it != mStatusEffects.end(); ++it) + for (std::set::const_iterator it = mStatusEffects.begin(), + it_end = mStatusEffects.end(); it != it_end; ++it) { const StatusEffect *effect = StatusEffect::getStatusEffect(*it, true); @@ -372,9 +372,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display, //setup particle effects if (Particle::enabled && particleEngine) { - StringVectCIter itr; - StringVectCIter itr_end; - for (itr = display.particles.begin(), + for (StringVectCIter itr = display.particles.begin(), itr_end = display.particles.end(); itr != itr_end; ++itr) { -- cgit v1.2.3-70-g09d2