diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-25 02:26:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-25 02:26:34 +0300 |
commit | c9f43996f3147100627ee2c6f9da993ceb160113 (patch) | |
tree | 7577f02f4658b19e05d586f66b67a9a4f5fedb7e /src/particleemitter.cpp | |
parent | 8e19f9b9d792cf4d3d3b022fd26a258c3d3d97bf (diff) | |
download | manaplus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.gz manaplus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.bz2 manaplus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.xz manaplus-c9f43996f3147100627ee2c6f9da993ceb160113.zip |
Improve iterators part 2.
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r-- | src/particleemitter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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<ImageSet*>::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<ImageSet*>::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<Particle *> ParticleEmitter::createParticles(int tick) newParticle->setAlpha(mParticleAlpha.value(tick)); for (std::list<ParticleEmitter>::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)); } |