From 879366f5dcc9362bd5e589bd70a013ea87d64430 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Mar 2016 15:15:49 +0300 Subject: Remove extra checks from particle. --- src/particle/particle.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 94d5acd17..425be6c91 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -311,10 +311,8 @@ bool Particle::update() restrict2 for (ParticleIterator p = mChildMoveParticles.begin(), fp2 = mChildMoveParticles.end(); p != fp2; ) { - Particle *restrict const particle = *p; // move particle with its parent if desired - if (particle->mFollow) - particle->moveBy(change); + (*p)->moveBy(change); } // Update child particles @@ -349,9 +347,7 @@ void Particle::moveBy(const Vector &restrict change) restrict2 mPos += change; FOR_EACH (ParticleConstIterator, p, mChildMoveParticles) { - Particle *restrict const particle = *p; - if (particle->mFollow) - particle->moveBy(change); + (*p)->moveBy(change); } } -- cgit v1.2.3-70-g09d2