From 0534847df83047f1ce2605187d45a762ffeae11e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Sep 2012 21:25:21 +0300 Subject: Add const to more classes. --- src/resources/chardb.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/resources/chardb.cpp') 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); -- cgit v1.2.3-70-g09d2