diff options
author | Andrei Karas <akaras@inbox.ru> | 2010-01-10 17:19:24 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-01-10 17:20:33 +0100 |
commit | f5a394a5051384a930d635da22ccafc6beb1cb84 (patch) | |
tree | d28fc14408a6bb91170e05880b4d2af6a17fcc14 /src/utils/xml.cpp | |
parent | 5757066312cab082378dbc5d8df97dea3fe40af0 (diff) | |
download | mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.gz mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.bz2 mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.xz mana-f5a394a5051384a930d635da22ccafc6beb1cb84.zip |
Change code style
Diffstat (limited to 'src/utils/xml.cpp')
-rw-r--r-- | src/utils/xml.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index 63487215..a81c37da 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -63,13 +63,16 @@ namespace XML } } - if (data) { + if (data) + { mDoc = xmlParseMemory(data, size); free(data); if (!mDoc) logger->log("Error parsing XML file %s", filename.c_str()); - } else { + } + else + { logger->log("Error loading %s", filename.c_str()); } } @@ -95,7 +98,8 @@ namespace XML int &ret = def; xmlChar *prop = xmlGetProp(node, BAD_CAST name); - if (prop) { + if (prop) + { ret = atoi((char*)prop); xmlFree(prop); } @@ -108,7 +112,8 @@ namespace XML double &ret = def; xmlChar *prop = xmlGetProp(node, BAD_CAST name); - if (prop) { + if (prop) + { ret = atof((char*)prop); xmlFree(prop); } @@ -120,7 +125,8 @@ namespace XML const std::string &def) { xmlChar *prop = xmlGetProp(node, BAD_CAST name); - if (prop) { + if (prop) + { std::string val = (char*)prop; xmlFree(prop); return val; |