summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
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