diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
commit | 3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch) | |
tree | ea57a752c348ba0a883294855ad3c62c16e9749d /src/utils/xml.h | |
parent | 872fc368f7b253f26714fc47323064f270b62b40 (diff) | |
download | plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2 plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip |
Add const to more classes.
Diffstat (limited to 'src/utils/xml.h')
-rw-r--r-- | src/utils/xml.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/utils/xml.h b/src/utils/xml.h index c5f217c78..cef1ebae2 100644 --- a/src/utils/xml.h +++ b/src/utils/xml.h @@ -50,7 +50,7 @@ namespace XML * Constructor that attempts to load the given file through the * resource manager. Logs errors. */ - Document(const std::string &filename, bool useResman = true); + Document(const std::string &filename, const bool useResman = true); /** * Constructor that attempts to load an XML document from memory. @@ -59,7 +59,7 @@ namespace XML * @param data the string to parse as XML * @param size the length of the string in bytes */ - Document(const char *data, int size); + Document(const char *const data, const int size); /** * Destructor. Frees the loaded XML file. @@ -79,40 +79,43 @@ namespace XML /** * Gets an floating point property from an XmlNodePtr. */ - double getFloatProperty(XmlNodePtr node, const char *name, double def); + double getFloatProperty(const XmlNodePtr node, const char *const name, + double def); /** * Gets an integer property from an XmlNodePtr. */ - int getProperty(XmlNodePtr node, const char *name, int def); + int getProperty(const XmlNodePtr node, const char *const name, int def); /** * Gets an integer property from an XmlNodePtr. */ - int getIntProperty(XmlNodePtr node, const char* name, int def, - int min, int max); + int getIntProperty(const XmlNodePtr node, const char *const name, int def, + const int min, const int max); /** * Gets a string property from an XmlNodePtr. */ - std::string getProperty(XmlNodePtr node, const char *name, + std::string getProperty(const XmlNodePtr node, const char *const name, const std::string &def); /** * Gets a translated string property from an XmlNodePtr. */ - std::string langProperty(XmlNodePtr node, const char *name, + std::string langProperty(const XmlNodePtr node, const char *const name, const std::string &def); /** * Gets a boolean property from an XmlNodePtr. */ - bool getBoolProperty(XmlNodePtr node, const char *name, bool def); + bool getBoolProperty(const XmlNodePtr node, const char *const name, + const bool def); /** * Finds the first child node with the given name */ - XmlNodePtr findFirstChildByName(XmlNodePtr parent, const char *name); + XmlNodePtr findFirstChildByName(const XmlNodePtr parent, + const char *const name); void initXML(); |