summaryrefslogtreecommitdiff
path: root/src/particle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/particle.cpp')
-rw-r--r--src/particle.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/particle.cpp b/src/particle.cpp
index 666821b93..a14fac698 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -204,12 +204,10 @@ bool Particle::update()
// Update child emitters
if ((mLifetimePast - 1) % Particle::emitterSkip == 0)
{
- for (EmitterConstIterator e = mChildEmitters.begin(),
- e2 = mChildEmitters.end(); e != e2; ++ e)
+ FOR_EACH (EmitterConstIterator, e, mChildEmitters)
{
Particles newParticles = (*e)->createParticles(mLifetimePast);
- for (ParticleConstIterator p = newParticles.begin(),
- p2 = newParticles.end(); p != p2; ++ p)
+ FOR_EACH (ParticleConstIterator, p, newParticles)
{
(*p)->moveBy(mPos);
mChildParticles.push_back (*p);
@@ -262,8 +260,7 @@ bool Particle::update()
void Particle::moveBy(const Vector &change)
{
mPos += change;
- for (ParticleConstIterator p = mChildParticles.begin(),
- p2 = mChildParticles.end(); p != p2; ++p)
+ FOR_EACH (ParticleConstIterator, p, mChildParticles)
{
if ((*p)->doesFollow())
(*p)->moveBy(change);
@@ -461,11 +458,8 @@ void Particle::adjustEmitterSize(const int w, const int h)
{
if (mAllowSizeAdjust)
{
- for (EmitterConstIterator e = mChildEmitters.begin(),
- e2 = mChildEmitters.end(); e != e2; ++e)
- {
+ FOR_EACH (EmitterConstIterator, e, mChildEmitters)
(*e)->adjustSize(w, h);
- }
}
}