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/monsterdb.cpp | |
parent | 0534847df83047f1ce2605187d45a762ffeae11e (diff) | |
download | manaverse-fa21c1b65dbe91a1e6ac880db977416162f268df.tar.gz manaverse-fa21c1b65dbe91a1e6ac880db977416162f268df.tar.bz2 manaverse-fa21c1b65dbe91a1e6ac880db977416162f268df.tar.xz manaverse-fa21c1b65dbe91a1e6ac880db977416162f268df.zip |
Add const to more classes.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index af0cd765c..26c72ed2f 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -61,10 +61,12 @@ void MonsterDB::load() } #ifdef MANASERV_SUPPORT - int offset = XML::getProperty(rootNode, "offset", Net::getNetworkType() != - ServerInfo::MANASERV ? OLD_TMWATHENA_OFFSET : 0); + const int offset = XML::getProperty(rootNode, "offset", + Net::getNetworkType() != ServerInfo::MANASERV + ? OLD_TMWATHENA_OFFSET : 0); #else - int offset = XML::getProperty(rootNode, "offset", OLD_TMWATHENA_OFFSET); + const int offset = XML::getProperty(rootNode, + "offset", OLD_TMWATHENA_OFFSET); #endif //iterate <monster>s @@ -73,7 +75,7 @@ void MonsterDB::load() if (!xmlNameEqual(monsterNode, "monster")) continue; - BeingInfo *currentInfo = new BeingInfo; + BeingInfo *const currentInfo = new BeingInfo; currentInfo->setWalkMask(Map::BLOCKMASK_WALL | Map::BLOCKMASK_CHARACTER | Map::BLOCKMASK_MONSTER); @@ -121,7 +123,7 @@ void MonsterDB::load() if (xmlNameEqual(spriteNode, "sprite")) { - SpriteReference *currentSprite = new SpriteReference; + SpriteReference *const currentSprite = new SpriteReference; currentSprite->sprite = reinterpret_cast<const char*>( spriteNode->xmlChildrenNode->content); @@ -213,7 +215,7 @@ void MonsterDB::unload() } -BeingInfo *MonsterDB::get(int id) +BeingInfo *MonsterDB::get(const int id) { BeingInfoIterator i = mMonsterInfos.find(id); |