diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 21:25:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 21:25:21 +0300 |
commit | 0534847df83047f1ce2605187d45a762ffeae11e (patch) | |
tree | 92365ee5ec086b3c65f024096df9d63bd05b31d4 /src/resources/chardb.cpp | |
parent | 4f390339f8107c376a10151a2cae889c0ec01089 (diff) | |
download | manaverse-0534847df83047f1ce2605187d45a762ffeae11e.tar.gz manaverse-0534847df83047f1ce2605187d45a762ffeae11e.tar.bz2 manaverse-0534847df83047f1ce2605187d45a762ffeae11e.tar.xz manaverse-0534847df83047f1ce2605187d45a762ffeae11e.zip |
Add const to more classes.
Diffstat (limited to 'src/resources/chardb.cpp')
-rw-r--r-- | src/resources/chardb.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/chardb.cpp b/src/resources/chardb.cpp index 6ee5f964f..23a1066ce 100644 --- a/src/resources/chardb.cpp +++ b/src/resources/chardb.cpp @@ -45,7 +45,7 @@ void CharDB::load() unload(); XML::Document *doc = new XML::Document("charcreation.xml"); - XmlNodePtr root = doc->rootNode(); + const XmlNodePtr root = doc->rootNode(); if (!root || !xmlNameEqual(root, "chars")) { @@ -72,7 +72,7 @@ void CharDB::load() } else if (xmlNameEqual(node, "item")) { - int id = XML::getProperty(node, "id", 0); + const int id = XML::getProperty(node, "id", 0); if (id > 0) mDefaultItems.push_back(id); } @@ -83,7 +83,8 @@ void CharDB::load() mLoaded = true; } -void CharDB::loadMinMax(XmlNodePtr node, unsigned *min, unsigned *max) +void CharDB::loadMinMax(const XmlNodePtr node, + unsigned *const min, unsigned *const max) { *min = XML::getProperty(node, "min", 1); *max = XML::getProperty(node, "max", 10); |