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/particle.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/particle/particle.cpp')
-rw-r--r-- | src/particle/particle.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index f22f11252..73cbb4b0d 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -223,7 +223,7 @@ bool Particle::update() restrict2 if (mAlive != AliveStatus::ALIVE && mAlive != AliveStatus::DEAD_LONG_AGO) { - if ((static_cast<unsigned int>(mAlive) & mDeathEffectConditions) + if ((CAST_U32(mAlive) & mDeathEffectConditions) > 0x00 && !mDeathEffect.empty()) { Particle *restrict const deathEffect = particleEngine->addEffect( @@ -396,27 +396,27 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile, char deathEffectConditions = 0x00; if (XML::getBoolProperty(emitterNode, "on-floor", true)) { - deathEffectConditions += static_cast<signed char>( + deathEffectConditions += CAST_S8( AliveStatus::DEAD_FLOOR); } if (XML::getBoolProperty(emitterNode, "on-sky", true)) { - deathEffectConditions += static_cast<signed char>( + deathEffectConditions += CAST_S8( AliveStatus::DEAD_SKY); } if (XML::getBoolProperty(emitterNode, "on-other", false)) { - deathEffectConditions += static_cast<signed char>( + deathEffectConditions += CAST_S8( AliveStatus::DEAD_OTHER); } if (XML::getBoolProperty(emitterNode, "on-impact", true)) { - deathEffectConditions += static_cast<signed char>( + deathEffectConditions += CAST_S8( AliveStatus::DEAD_IMPACT); } if (XML::getBoolProperty(emitterNode, "on-timeout", true)) { - deathEffectConditions += static_cast<signed char>( + deathEffectConditions += CAST_S8( AliveStatus::DEAD_TIMEOUT); } newParticle->setDeathEffect( |