diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/particle/particleemitter.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/particle/particleemitter.cpp')
-rw-r--r-- | src/particle/particleemitter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index a512cff94..d82282060 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -323,27 +323,27 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtrConst emitterNode, mDeathEffectConditions = 0x00; if (XML::getBoolProperty(propertyNode, "on-floor", true)) { - mDeathEffectConditions += static_cast<signed char>( + mDeathEffectConditions += CAST_S8( AliveStatus::DEAD_FLOOR); } if (XML::getBoolProperty(propertyNode, "on-sky", true)) { - mDeathEffectConditions += static_cast<signed char>( + mDeathEffectConditions += CAST_S8( AliveStatus::DEAD_SKY); } if (XML::getBoolProperty(propertyNode, "on-other", false)) { - mDeathEffectConditions += static_cast<signed char>( + mDeathEffectConditions += CAST_S8( AliveStatus::DEAD_OTHER); } if (XML::getBoolProperty(propertyNode, "on-impact", true)) { - mDeathEffectConditions += static_cast<signed char>( + mDeathEffectConditions += CAST_S8( AliveStatus::DEAD_IMPACT); } if (XML::getBoolProperty(propertyNode, "on-timeout", true)) { - mDeathEffectConditions += static_cast<signed char>( + mDeathEffectConditions += CAST_S8( AliveStatus::DEAD_TIMEOUT); } } @@ -593,8 +593,8 @@ void ParticleEmitter::adjustSize(const int w, const int h) return; // new dimensions are illegal // calculate the old rectangle - const int oldArea = static_cast<int>( - mParticlePosX.maxVal - mParticlePosX.minVal) * static_cast<int>( + const int oldArea = CAST_S32( + mParticlePosX.maxVal - mParticlePosX.minVal) * CAST_S32( mParticlePosX.maxVal - mParticlePosY.minVal); if (oldArea == 0) { @@ -610,8 +610,8 @@ void ParticleEmitter::adjustSize(const int w, const int h) // adjust the output so that the particle density stays the same const float outputFactor = static_cast<float>(newArea) / static_cast<float>(oldArea); - mOutput.minVal = static_cast<int>(static_cast<float>( + mOutput.minVal = CAST_S32(static_cast<float>( mOutput.minVal) * outputFactor); - mOutput.maxVal = static_cast<int>(static_cast<float>( + mOutput.maxVal = CAST_S32(static_cast<float>( mOutput.maxVal) * outputFactor); } |