From f98d003e354a1792117b7cbc771d1dd91475a156 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Mar 2011 17:48:29 +0200 Subject: Fix most old style cast except manaserv and libxml2 defines. --- src/particle.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/particle.cpp') diff --git a/src/particle.cpp b/src/particle.cpp index 24f6e128f..9ecd8e65d 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -315,8 +315,8 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, // Image else if ((node = XML::findFirstChildByName(effectChildNode, "image"))) { - Image *img = resman->getImage((const char*) - node->xmlChildrenNode->content); + Image *img = resman->getImage(reinterpret_cast( + node->xmlChildrenNode->content)); newParticle = new ImageParticle(mMap, img); } @@ -333,8 +333,8 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, effectChildNode, "position-y", 0); float offsetZ = XML::getFloatProperty( effectChildNode, "position-z", 0); - Vector position (mPos.x + (float)pixelX + offsetX, - mPos.y + (float)pixelY + offsetY, + Vector position (mPos.x + static_cast(pixelX) + offsetX, + mPos.y + static_cast(pixelY) + offsetY, mPos.z + offsetZ); newParticle->moveTo(position); @@ -357,8 +357,8 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, } else if (xmlStrEqual(emitterNode->name, BAD_CAST "deatheffect")) { - std::string deathEffect = (const char*)emitterNode - ->xmlChildrenNode->content; + std::string deathEffect = reinterpret_cast( + emitterNode->xmlChildrenNode->content); char deathEffectConditions = 0x00; if (XML::getBoolProperty(emitterNode, "on-floor", true)) -- cgit v1.2.3-70-g09d2