summaryrefslogtreecommitdiff
path: root/src/resources/db/avatardb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
commit0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch)
tree6259593b8436178ad8d981a96a8fd71eab9e04cc /src/resources/db/avatardb.cpp
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadmv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/resources/db/avatardb.cpp')
-rw-r--r--src/resources/db/avatardb.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp
index 7e58db364..5f1ac6da7 100644
--- a/src/resources/db/avatardb.cpp
+++ b/src/resources/db/avatardb.cpp
@@ -76,7 +76,8 @@ void AvatarDB::loadXmlFile(const std::string &fileName)
if (!xmlNameEqual(avatarNode, "avatar"))
continue;
- const int id = XML::getProperty(avatarNode, "id", 0);
+ const BeingId id = fromInt(XML::getProperty(
+ avatarNode, "id", 0), BeingId);
BeingInfo *currentInfo = nullptr;
if (mAvatarInfos.find(id) != mAvatarInfos.end())
currentInfo = mAvatarInfos[id];
@@ -131,7 +132,7 @@ void AvatarDB::unload()
mLoaded = false;
}
-BeingInfo *AvatarDB::get(const int id)
+BeingInfo *AvatarDB::get(const BeingId id)
{
BeingInfoIterator i = mAvatarInfos.find(id);
if (i == mAvatarInfos.end())