From bcaad53fbea2d34f7db92da87fcadadec0e7a261 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Sun, 22 Dec 2013 23:15:31 -0800 Subject: [PATCH] - cleanup some msvc++ compiler warnings --- source/glest_game/graphics/particle_type.cpp | 8 ++++---- source/glest_game/graphics/unit_particle_type.cpp | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/glest_game/graphics/particle_type.cpp b/source/glest_game/graphics/particle_type.cpp index b553cd2b2..110ada9db 100644 --- a/source/glest_game/graphics/particle_type.cpp +++ b/source/glest_game/graphics/particle_type.cpp @@ -333,8 +333,8 @@ void ParticleSystemType::loadGame(const XmlNode *rootNode) { energyMax = particleSystemTypeNode->getAttribute("energyMax")->getIntValue(); energyVar = particleSystemTypeNode->getAttribute("energyVar")->getIntValue(); mode = particleSystemTypeNode->getAttribute("mode")->getValue(); - teamcolorNoEnergy = particleSystemTypeNode->getAttribute("teamcolorNoEnergy")->getIntValue(); - teamcolorEnergy = particleSystemTypeNode->getAttribute("teamcolorEnergy")->getIntValue(); + teamcolorNoEnergy = (particleSystemTypeNode->getAttribute("teamcolorNoEnergy")->getIntValue() != 0); + teamcolorEnergy = (particleSystemTypeNode->getAttribute("teamcolorEnergy")->getIntValue() != 0); alternations = particleSystemTypeNode->getAttribute("alternations")->getIntValue(); particleSystemStartDelay = particleSystemTypeNode->getAttribute("particleSystemStartDelay")->getIntValue(); @@ -349,10 +349,10 @@ void ParticleSystemType::loadGame(const XmlNode *rootNode) { } } - minmaxEnabled = particleSystemTypeNode->getAttribute("minmaxEnabled")->getIntValue(); + minmaxEnabled = (particleSystemTypeNode->getAttribute("minmaxEnabled")->getIntValue() != 0); minHp = particleSystemTypeNode->getAttribute("minHp")->getIntValue(); maxHp = particleSystemTypeNode->getAttribute("maxHp")->getIntValue(); - minmaxIsPercent = particleSystemTypeNode->getAttribute("minmaxIsPercent")->getIntValue(); + minmaxIsPercent = (particleSystemTypeNode->getAttribute("minmaxIsPercent")->getIntValue() != 0); } void ParticleSystemType::saveGame(XmlNode *rootNode) { diff --git a/source/glest_game/graphics/unit_particle_type.cpp b/source/glest_game/graphics/unit_particle_type.cpp index bc2adbd48..58bd88086 100644 --- a/source/glest_game/graphics/unit_particle_type.cpp +++ b/source/glest_game/graphics/unit_particle_type.cpp @@ -302,14 +302,14 @@ void UnitParticleSystemType::loadGame(const XmlNode *rootNode) { minRadius = unitParticleSystemTypeNode->getAttribute("minRadius")->getFloatValue(); emissionRateFade = unitParticleSystemTypeNode->getAttribute("emissionRateFade")->getFloatValue(); direction = Vec3f::strToVec3(unitParticleSystemTypeNode->getAttribute("direction")->getValue()); - relative = unitParticleSystemTypeNode->getAttribute("relative")->getIntValue(); - relativeDirection = unitParticleSystemTypeNode->getAttribute("relativeDirection")->getIntValue(); - fixed = unitParticleSystemTypeNode->getAttribute("fixed")->getIntValue(); + relative = (unitParticleSystemTypeNode->getAttribute("relative")->getIntValue() != 0); + relativeDirection = (unitParticleSystemTypeNode->getAttribute("relativeDirection")->getIntValue() != 0); + fixed = (unitParticleSystemTypeNode->getAttribute("fixed")->getIntValue() != 0); staticParticleCount = unitParticleSystemTypeNode->getAttribute("staticParticleCount")->getIntValue(); - isVisibleAtNight = unitParticleSystemTypeNode->getAttribute("isVisibleAtNight")->getIntValue(); - isVisibleAtDay = unitParticleSystemTypeNode->getAttribute("isVisibleAtDay")->getIntValue(); - isDaylightAffected = unitParticleSystemTypeNode->getAttribute("isDaylightAffected")->getIntValue(); - radiusBasedStartenergy = unitParticleSystemTypeNode->getAttribute("radiusBasedStartenergy")->getIntValue(); + isVisibleAtNight = (unitParticleSystemTypeNode->getAttribute("isVisibleAtNight")->getIntValue() != 0); + isVisibleAtDay = (unitParticleSystemTypeNode->getAttribute("isVisibleAtDay")->getIntValue() != 0); + isDaylightAffected = (unitParticleSystemTypeNode->getAttribute("isDaylightAffected")->getIntValue() != 0); + radiusBasedStartenergy = (unitParticleSystemTypeNode->getAttribute("radiusBasedStartenergy")->getIntValue() != 0); delay = unitParticleSystemTypeNode->getAttribute("delay")->getIntValue(); lifetime = unitParticleSystemTypeNode->getAttribute("lifetime")->getIntValue(); startTime = unitParticleSystemTypeNode->getAttribute("startTime")->getFloatValue();