summaryrefslogtreecommitdiff
path: root/src/effectmanager.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/effectmanager.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/effectmanager.cpp')
-rw-r--r--src/effectmanager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
index 4b2cc9188..383f997ab 100644
--- a/src/effectmanager.cpp
+++ b/src/effectmanager.cpp
@@ -53,7 +53,7 @@ void EffectManager::loadXmlFile(const std::string &fileName,
XML::Document doc(fileName, UseVirtFs_true, skipError);
XmlNodeConstPtrConst root = doc.rootNode();
- if (!root ||
+ if ((root == nullptr) ||
!xmlNameEqual(root, "being-effects"))
{
logger->log("Error loading being effects file: " + fileName);
@@ -119,7 +119,7 @@ bool EffectManager::trigger(const int id,
Being *const being,
const int rotation)
{
- if (!being || !particleEngine || id == -1)
+ if ((being == nullptr) || (particleEngine == nullptr) || id == -1)
return false;
BLOCK_START("EffectManager::trigger")
@@ -152,7 +152,7 @@ Particle *EffectManager::triggerReturn(const int id,
Being *const being,
const int rotation)
{
- if (!being || !particleEngine || id == -1)
+ if ((being == nullptr) || (particleEngine == nullptr) || id == -1)
return nullptr;
Particle *rValue = nullptr;
@@ -183,7 +183,7 @@ bool EffectManager::trigger(const int id,
const time_t endTime,
const int rotation)
{
- if (!particleEngine || id == -1)
+ if ((particleEngine == nullptr) || id == -1)
return false;
bool rValue = false;
@@ -199,7 +199,7 @@ bool EffectManager::trigger(const int id,
effect.gfx,
x, y,
rotation);
- if (particle)
+ if (particle != nullptr)
mTimers.push_back(ParticleTimer(particle, endTime));
}
if (!effect.sfx.empty())
@@ -249,7 +249,7 @@ void EffectManager::logic()
{
found = true;
Particle *const particle = timer.particle;
- if (particle)
+ if (particle != nullptr)
particle->kill();
mTimers.erase(it);
break;
@@ -263,7 +263,7 @@ void EffectManager::clear()
FOR_EACH (std::list<ParticleTimer>::iterator, it, mTimers)
{
Particle *const particle = (*it).particle;
- if (particle)
+ if (particle != nullptr)
particle->kill();
}
mTimers.clear();