diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-18 17:48:29 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-18 17:49:00 +0200 |
commit | f98d003e354a1792117b7cbc771d1dd91475a156 (patch) | |
tree | dc2a297f7c4026394c9954ae4bfd4abd22ef9612 /src/utils/xml.cpp | |
parent | bb0a6cb25b2985fd1f74c9d27d5a46f6863e2dee (diff) | |
download | ManaVerse-f98d003e354a1792117b7cbc771d1dd91475a156.tar.gz ManaVerse-f98d003e354a1792117b7cbc771d1dd91475a156.tar.bz2 ManaVerse-f98d003e354a1792117b7cbc771d1dd91475a156.tar.xz ManaVerse-f98d003e354a1792117b7cbc771d1dd91475a156.zip |
Fix most old style cast except manaserv and libxml2 defines.
Diffstat (limited to 'src/utils/xml.cpp')
-rw-r--r-- | src/utils/xml.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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<char*>(resman->loadFile( + filename.c_str(), size)); } else { @@ -54,7 +55,7 @@ namespace XML size = static_cast<int>(file.tellg()); file.seekg(0, std::ios::beg); - data = (char*) malloc(size); + data = static_cast<char*>(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<char*>(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<char*>(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<char*>(prop); xmlFree(prop); return val; } |