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/utils/xml.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/utils/xml.cpp') diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index adba59fce..0ffd2acfc 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -40,7 +40,8 @@ namespace XML if (useResman) { ResourceManager *resman = ResourceManager::getInstance(); - data = (char*) resman->loadFile(filename.c_str(), size); + data = static_cast(resman->loadFile( + filename.c_str(), size)); } else { @@ -54,7 +55,7 @@ namespace XML size = static_cast(file.tellg()); file.seekg(0, std::ios::beg); - data = (char*) malloc(size); + data = static_cast(malloc(size)); file.read(data, size); file.close(); @@ -105,7 +106,7 @@ namespace XML xmlChar *prop = xmlGetProp(node, BAD_CAST name); if (prop) { - ret = atoi((char*)prop); + ret = atoi(reinterpret_cast(prop)); xmlFree(prop); } @@ -119,7 +120,7 @@ namespace XML xmlChar *prop = xmlGetProp(node, BAD_CAST name); if (prop) { - ret = atof((char*)prop); + ret = atof(reinterpret_cast(prop)); xmlFree(prop); } @@ -132,7 +133,7 @@ namespace XML xmlChar *prop = xmlGetProp(node, BAD_CAST name); if (prop) { - std::string val = (char*)prop; + std::string val = reinterpret_cast(prop); xmlFree(prop); return val; } -- cgit v1.2.3-60-g2f50