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/particleemitter.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/particleemitter.cpp') diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index c6c819e92..5fefd3609 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -431,8 +431,8 @@ ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter &o) mTempSets = o.mTempSets; for (std::vector::const_iterator - i = mTempSets.begin(); - i != mTempSets.end(); ++i) + i = mTempSets.begin(), i_end = mTempSets.end(); + i != i_end; ++ i) { if (*i) (*i)->incRef(); @@ -449,8 +449,8 @@ ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter &o) ParticleEmitter::~ParticleEmitter() { for (std::vector::const_iterator - i = mTempSets.begin(); - i != mTempSets.end(); ++i) + i = mTempSets.begin(), i_end = mTempSets.end(); + i != i_end; ++i) { if (*i) (*i)->decRef(); @@ -572,8 +572,9 @@ std::list ParticleEmitter::createParticles(int tick) newParticle->setAlpha(mParticleAlpha.value(tick)); for (std::list::const_iterator - it = mParticleChildEmitters.begin(); - it != mParticleChildEmitters.end(); ++it) + it = mParticleChildEmitters.begin(), + it_end = mParticleChildEmitters.end(); + it != it_end; ++it) { newParticle->addEmitter(new ParticleEmitter(*it)); } -- cgit v1.2.3-70-g09d2