From 767b8400fb086616616a298655f0bc2eaf239256 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 May 2014 22:48:11 +0300 Subject: Fix code style in other files. --- src/particle/particle.cpp | 3 ++- src/particle/particlecontainer.cpp | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/particle') diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index c446fa177..d86edf584 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -217,7 +217,8 @@ bool Particle::update() // create death effect when the particle died if (mAlive != ALIVE && mAlive != DEAD_LONG_AGO) { - if ((mAlive & mDeathEffectConditions) > 0x00 && !mDeathEffect.empty()) + if ((static_cast(mAlive) & mDeathEffectConditions) + > 0x00 && !mDeathEffect.empty()) { Particle *const deathEffect = particleEngine->addEffect( mDeathEffect, 0, 0); diff --git a/src/particle/particlecontainer.cpp b/src/particle/particlecontainer.cpp index 07eb36dc4..52179bce8 100644 --- a/src/particle/particlecontainer.cpp +++ b/src/particle/particlecontainer.cpp @@ -144,7 +144,7 @@ void ParticleVector::setLocally(const int index, Particle *const particle) delLocally(index); - if (mIndexedElements.size() <= static_cast(index)) + if (mIndexedElements.size() <= static_cast(index)) mIndexedElements.resize(index + 1, nullptr); if (particle) @@ -157,7 +157,7 @@ void ParticleVector::delLocally(const int index) if (index < 0) return; - if (mIndexedElements.size() <= static_cast(index)) + if (mIndexedElements.size() <= static_cast(index)) return; Particle *const p = mIndexedElements[index]; @@ -170,8 +170,12 @@ void ParticleVector::delLocally(const int index) void ParticleVector::clearLocally() { - for (unsigned int i = 0; i < mIndexedElements.size(); i++) + for (unsigned int i = 0; + i < static_cast(mIndexedElements.size()); + i++) + { delLocally(i); + } } void ParticleVector::moveTo(const float x, const float y) -- cgit v1.2.3-60-g2f50