summaryrefslogtreecommitdiff
path: root/src/particle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-18 17:48:29 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-18 17:49:00 +0200
commitf98d003e354a1792117b7cbc771d1dd91475a156 (patch)
treedc2a297f7c4026394c9954ae4bfd4abd22ef9612 /src/particle.cpp
parentbb0a6cb25b2985fd1f74c9d27d5a46f6863e2dee (diff)
downloadmanaplus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.gz
manaplus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.bz2
manaplus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.xz
manaplus-f98d003e354a1792117b7cbc771d1dd91475a156.zip
Fix most old style cast except manaserv and libxml2 defines.
Diffstat (limited to 'src/particle.cpp')
-rw-r--r--src/particle.cpp12
1 files changed, 6 insertions, 6 deletions
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<const char*>(
+ 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<float>(pixelX) + offsetX,
+ mPos.y + static_cast<float>(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<const char*>(
+ emitterNode->xmlChildrenNode->content);
char deathEffectConditions = 0x00;
if (XML::getBoolProperty(emitterNode, "on-floor", true))