summaryrefslogtreecommitdiff
path: root/src/resources/beinginfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/resources/beinginfo.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
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 466a5832d..e4fe5c851 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -148,7 +148,7 @@ void BeingInfo::addSound(const ItemSoundEvent::Type event,
if (mSounds.find(event) == mSounds.end())
mSounds[event] = new SoundInfoVect;
- if (mSounds[event])
+ if (mSounds[event] != nullptr)
mSounds[event]->push_back(SoundInfo("sfx/" + filename, delay));
}
@@ -162,7 +162,7 @@ const SoundInfo &BeingInfo::getSound(const ItemSoundEvent::Type event) const
return emptySound;
const SoundInfoVect *const vect = i->second;
- if (!vect || vect->empty())
+ if ((vect == nullptr) || vect->empty())
return emptySound;
else
return vect->at(CAST_SIZE(rand()) % vect->size());
@@ -205,7 +205,7 @@ void BeingInfo::clear()
void BeingInfo::init()
{
- if (empty)
+ if (empty != nullptr)
{
empty->mEffectId = paths.getIntValue("effectId");
empty->mHitEffectId = paths.getIntValue("hitEffectId");
@@ -224,7 +224,7 @@ void BeingInfo::setColorsList(const std::string &name)
std::string BeingInfo::getColor(const ItemColor idx) const
{
- if (!mColors)
+ if (mColors == nullptr)
return std::string();
const std::map <ItemColor, ColorDB::ItemColorData>::const_iterator