summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 20:58:03 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 20:58:03 +0100
commite5671f8bdc30ac567a535f698c8dcaedd4441340 (patch)
tree70c2d966109e27e40dfd3516145f818af60ce8a0 /src/utils
parent719e2b02bc6833198d6af2d3c95de96ef95f876d (diff)
downloadmana-client-e5671f8bdc30ac567a535f698c8dcaedd4441340.tar.gz
mana-client-e5671f8bdc30ac567a535f698c8dcaedd4441340.tar.bz2
mana-client-e5671f8bdc30ac567a535f698c8dcaedd4441340.tar.xz
mana-client-e5671f8bdc30ac567a535f698c8dcaedd4441340.zip
Some code reformatting
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/xml.cpp15
-rw-r--r--src/utils/xml.h10
2 files changed, 11 insertions, 14 deletions
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index 47f1bd04..05df9f1d 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -26,7 +26,7 @@
namespace XML
{
Document::Document(const std::string &filename):
- mDoc(NULL)
+ mDoc(0)
{
int size;
ResourceManager *resman = ResourceManager::getInstance();
@@ -59,8 +59,7 @@ namespace XML
return mDoc ? xmlDocGetRootElement(mDoc) : 0;
}
- int
- getProperty(xmlNodePtr node, const char* name, int def)
+ int getProperty(xmlNodePtr node, const char* name, int def)
{
int &ret = def;
@@ -73,8 +72,7 @@ namespace XML
return ret;
}
- double
- getFloatProperty(xmlNodePtr node, const char* name, double def)
+ double getFloatProperty(xmlNodePtr node, const char* name, double def)
{
double &ret = def;
@@ -87,8 +85,8 @@ namespace XML
return ret;
}
- std::string
- getProperty(xmlNodePtr node, const char *name, const std::string &def)
+ std::string getProperty(xmlNodePtr node, const char *name,
+ const std::string &def)
{
xmlChar *prop = xmlGetProp(node, BAD_CAST name);
if (prop) {
@@ -108,4 +106,5 @@ namespace XML
return NULL;
}
-}
+
+} // namespace XML
diff --git a/src/utils/xml.h b/src/utils/xml.h
index 5a5c756b..d0aba62e 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -71,20 +71,18 @@ namespace XML
/**
* Gets an integer property from an xmlNodePtr.
*/
- int
- getProperty(xmlNodePtr node, const char *name, int def);
+ int getProperty(xmlNodePtr node, const char *name, int def);
/**
* Gets an floating point property from an xmlNodePtr.
*/
- double
- getFloatProperty(xmlNodePtr node, const char *name, double def);
+ double getFloatProperty(xmlNodePtr node, const char *name, double def);
/**
* Gets a string property from an xmlNodePtr.
*/
- std::string
- getProperty(xmlNodePtr node, const char *name, const std::string &def);
+ std::string getProperty(xmlNodePtr node, const char *name,
+ const std::string &def);
/**
* Finds the first child node with the given name