From 7bdb50605562e47f1d6ae134881c09bd42293be5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 16:19:21 +0300 Subject: Add strong typed int type BeingTypeId. --- src/resources/db/mercenarydb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/resources/db/mercenarydb.cpp') diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp index 13dfbbd45..a6950e9fb 100644 --- a/src/resources/db/mercenarydb.cpp +++ b/src/resources/db/mercenarydb.cpp @@ -85,11 +85,11 @@ void MercenaryDB::loadXmlFile(const std::string &fileName) const int id = XML::getProperty(mercenaryNode, "id", 0); BeingInfo *currentInfo = nullptr; - if (mMercenaryInfos.find(fromInt(id + offset, BeingId)) + if (mMercenaryInfos.find(fromInt(id + offset, BeingTypeId)) != mMercenaryInfos.end()) { logger->log("MercenaryDB: Redefinition of mercenary ID %d", id); - currentInfo = mMercenaryInfos[fromInt(id + offset, BeingId)]; + currentInfo = mMercenaryInfos[fromInt(id + offset, BeingTypeId)]; } if (!currentInfo) currentInfo = new BeingInfo; @@ -133,7 +133,7 @@ void MercenaryDB::loadXmlFile(const std::string &fileName) } currentInfo->setDisplay(display); - mMercenaryInfos[fromInt(id + offset, BeingId)] = currentInfo; + mMercenaryInfos[fromInt(id + offset, BeingTypeId)] = currentInfo; } } @@ -146,7 +146,7 @@ void MercenaryDB::unload() } -BeingInfo *MercenaryDB::get(const BeingId id) +BeingInfo *MercenaryDB::get(const BeingTypeId id) { BeingInfoIterator i = mMercenaryInfos.find(id); -- cgit v1.2.3-60-g2f50