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/resources/itemdb.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/resources/itemdb.cpp') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 4ba254cf3..c7515fc6b 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -510,22 +510,20 @@ int parseSpriteName(std::string &name) void loadSpriteRef(ItemInfo *itemInfo, xmlNodePtr node) { std::string gender = XML::getProperty(node, "gender", "unisex"); - std::string filename = (const char*) node->xmlChildrenNode->content; + std::string filename = reinterpret_cast( + node->xmlChildrenNode->content); if (gender == "male" || gender == "unisex") - { itemInfo->setSprite(filename, GENDER_MALE); - } if (gender == "female" || gender == "unisex") - { itemInfo->setSprite(filename, GENDER_FEMALE); - } } void loadSoundRef(ItemInfo *itemInfo, xmlNodePtr node) { std::string event = XML::getProperty(node, "event", ""); - std::string filename = (const char*) node->xmlChildrenNode->content; + std::string filename = reinterpret_cast( + node->xmlChildrenNode->content); if (event == "hit") { @@ -549,16 +547,16 @@ void loadFloorSprite(SpriteDisplay *display, xmlNodePtr floorNode) if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) { SpriteReference *currentSprite = new SpriteReference; - currentSprite->sprite - = (const char*)spriteNode->xmlChildrenNode->content; + currentSprite->sprite = reinterpret_cast( + spriteNode->xmlChildrenNode->content); currentSprite->variant = XML::getProperty(spriteNode, "variant", 0); display->sprites.push_back(currentSprite); } else if (xmlStrEqual(spriteNode->name, BAD_CAST "particlefx")) { - std::string particlefx - = (const char*)spriteNode->xmlChildrenNode->content; + std::string particlefx = reinterpret_cast( + spriteNode->xmlChildrenNode->content); display->particles.push_back(particlefx); } } -- cgit v1.2.3-70-g09d2