summaryrefslogtreecommitdiff
path: root/src/being/castingeffect.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/being/castingeffect.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/being/castingeffect.cpp')
-rw-r--r--src/being/castingeffect.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/being/castingeffect.cpp b/src/being/castingeffect.cpp
index 0d80f7ce2..cd7bec82a 100644
--- a/src/being/castingeffect.cpp
+++ b/src/being/castingeffect.cpp
@@ -46,15 +46,15 @@ CastingEffect::CastingEffect(const int skillId,
mRectX((x - range) * mapTileSize),
mRectY((y - range) * mapTileSize),
mRectSize(range * mapTileSize * 2 + mapTileSize),
- mAnimationX(mRectX + (mRectSize - (mSprite ?
+ mAnimationX(mRectX + (mRectSize - (mSprite != nullptr ?
mSprite->getWidth() : 0)) / 2),
- mAnimationY(mRectY + (mRectSize - (mSprite ?
+ mAnimationY(mRectY + (mRectSize - (mSprite != nullptr ?
mSprite->getHeight() : 0)) / 2)
{
mPixelX = x * mapTileSize;
mPixelY = y * mapTileSize;
mYDiff = range * mapTileSize + 31;
- if (!mSprite)
+ if (mSprite == nullptr)
{
reportAlways("Skill %d/%d casting animation '%s' load failed",
skillId,
@@ -79,7 +79,7 @@ void CastingEffect::draw(Graphics *const graphics,
mRectY + offsetY,
mRectSize,
mRectSize));
- if (mSprite)
+ if (mSprite != nullptr)
{
mSprite->draw(graphics,
mAnimationX + offsetX,
@@ -89,13 +89,13 @@ void CastingEffect::draw(Graphics *const graphics,
void CastingEffect::update(const int time)
{
- if (mSprite)
+ if (mSprite != nullptr)
mSprite->update(time);
}
bool CastingEffect::isTerminated() const
{
- if (mSprite)
+ if (mSprite != nullptr)
return mSprite->isTerminated();
return false;
}