diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-17 15:15:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-17 15:15:49 +0300 |
commit | 879366f5dcc9362bd5e589bd70a013ea87d64430 (patch) | |
tree | 73af50efbdf5113a5874d1ad530bca29f9f2feba /src/particle/particle.cpp | |
parent | 460d7531d77019dc4ad799948e02651c9625ee2d (diff) | |
download | mv-879366f5dcc9362bd5e589bd70a013ea87d64430.tar.gz mv-879366f5dcc9362bd5e589bd70a013ea87d64430.tar.bz2 mv-879366f5dcc9362bd5e589bd70a013ea87d64430.tar.xz mv-879366f5dcc9362bd5e589bd70a013ea87d64430.zip |
Remove extra checks from particle.
Diffstat (limited to 'src/particle/particle.cpp')
-rw-r--r-- | src/particle/particle.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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); } } |