diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-03 00:32:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-03 00:32:00 +0300 |
commit | fa21c1b65dbe91a1e6ac880db977416162f268df (patch) | |
tree | 7fa06ef18a171d62ff892c99e710d4df7aff91b5 /src/resources/specialdb.cpp | |
parent | 0534847df83047f1ce2605187d45a762ffeae11e (diff) | |
download | manaplus-fa21c1b65dbe91a1e6ac880db977416162f268df.tar.gz manaplus-fa21c1b65dbe91a1e6ac880db977416162f268df.tar.bz2 manaplus-fa21c1b65dbe91a1e6ac880db977416162f268df.tar.xz manaplus-fa21c1b65dbe91a1e6ac880db977416162f268df.zip |
Add const to more classes.
Diffstat (limited to 'src/resources/specialdb.cpp')
-rw-r--r-- | src/resources/specialdb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/specialdb.cpp b/src/resources/specialdb.cpp index 50ea773bc..8d867b144 100644 --- a/src/resources/specialdb.cpp +++ b/src/resources/specialdb.cpp @@ -55,7 +55,7 @@ void SpecialDB::load() logger->log("Initializing special database..."); XML::Document doc("specials.xml"); - XmlNodePtr root = doc.rootNode(); + const XmlNodePtr root = doc.rootNode(); if (!root || !xmlNameEqual(root, "specials")) { @@ -75,8 +75,8 @@ void SpecialDB::load() { if (xmlNameEqual(special, "special")) { - SpecialInfo *info = new SpecialInfo(); - int id = XML::getProperty(special, "id", 0); + SpecialInfo *const info = new SpecialInfo(); + const int id = XML::getProperty(special, "id", 0); info->id = id; info->set = setName; info->name = XML::getProperty(special, "name", ""); @@ -121,9 +121,9 @@ void SpecialDB::unload() } -SpecialInfo *SpecialDB::get(int id) +SpecialInfo *SpecialDB::get(const int id) { - SpecialInfos::const_iterator i = mSpecialInfos.find(id); + const SpecialInfos::const_iterator i = mSpecialInfos.find(id); if (i == mSpecialInfos.end()) return nullptr; |