summaryrefslogtreecommitdiff
path: root/src/resources/beinginfo.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/resources/beinginfo.cpp
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-client-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-client-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-client-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-client-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/resources/beinginfo.cpp')
-rw-r--r--src/resources/beinginfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 5a277770..539254ac 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -86,20 +86,20 @@ const std::string &BeingInfo::getSound(SoundEvent event) const
{
static const std::string empty;
- SoundEvents::const_iterator i = mSounds.find(event);
+ auto i = mSounds.find(event);
return (i == mSounds.end()) ? empty :
i->second->at(rand() % i->second->size());
}
const Attack *BeingInfo::getAttack(int id) const
{
- static Attack *empty = new Attack(SpriteAction::ATTACK,
+ static auto *empty = new Attack(SpriteAction::ATTACK,
-1, // Default strike effect on monster
paths.getIntValue("hitEffectId"),
paths.getIntValue("criticalHitEffectId"),
std::string());
- Attacks::const_iterator it = mAttacks.find(id);
+ auto it = mAttacks.find(id);
return (it == mAttacks.end()) ? empty : it->second;
}
@@ -107,7 +107,7 @@ void BeingInfo::addAttack(int id, std::string action, int effectId,
int hitEffectId, int criticalHitEffectId,
const std::string &missileParticleFilename)
{
- Attacks::iterator it = mAttacks.find(id);
+ auto it = mAttacks.find(id);
if (it != mAttacks.end())
delete it->second;