summaryrefslogtreecommitdiff
path: root/src/resources/beinginfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-02 21:25:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 21:25:21 +0300
commit0534847df83047f1ce2605187d45a762ffeae11e (patch)
tree92365ee5ec086b3c65f024096df9d63bd05b31d4 /src/resources/beinginfo.cpp
parent4f390339f8107c376a10151a2cae889c0ec01089 (diff)
downloadmv-0534847df83047f1ce2605187d45a762ffeae11e.tar.gz
mv-0534847df83047f1ce2605187d45a762ffeae11e.tar.bz2
mv-0534847df83047f1ce2605187d45a762ffeae11e.tar.xz
mv-0534847df83047f1ce2605187d45a762ffeae11e.zip
Add const to more classes.
Diffstat (limited to 'src/resources/beinginfo.cpp')
-rw-r--r--src/resources/beinginfo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 1f2bd3e9a..1559f594c 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -86,7 +86,7 @@ void BeingInfo::setTargetCursorSize(const std::string &size)
}
}
-void BeingInfo::addSound(SoundEvent event, const std::string &filename)
+void BeingInfo::addSound(const SoundEvent event, const std::string &filename)
{
if (mSounds.find(event) == mSounds.end())
mSounds[event] = new StringVect;
@@ -95,23 +95,23 @@ void BeingInfo::addSound(SoundEvent event, const std::string &filename)
mSounds[event]->push_back("sfx/" + filename);
}
-const std::string &BeingInfo::getSound(SoundEvent event) const
+const std::string &BeingInfo::getSound(const SoundEvent event) const
{
static std::string emptySound("");
- SoundEvents::const_iterator i = mSounds.find(event);
+ const SoundEvents::const_iterator i = mSounds.find(event);
return (i == mSounds.end() || !i->second) ? emptySound :
i->second->at(rand() % i->second->size());
}
-const Attack *BeingInfo::getAttack(int type) const
+const Attack *BeingInfo::getAttack(const int type) const
{
- Attacks::const_iterator i = mAttacks.find(type);
+ const Attacks::const_iterator i = mAttacks.find(type);
return (i == mAttacks.end()) ? empty : (*i).second;
}
-void BeingInfo::addAttack(int id, std::string action,
+void BeingInfo::addAttack(const int id, std::string action,
const std::string &particleEffect,
const std::string &missileParticle)
{