summaryrefslogtreecommitdiff
path: root/src/input/joystick.h
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/input/joystick.h
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/input/joystick.h')
-rw-r--r--src/input/joystick.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input/joystick.h b/src/input/joystick.h
index 0238285aa..4088cc84c 100644
--- a/src/input/joystick.h
+++ b/src/input/joystick.h
@@ -99,16 +99,16 @@ class Joystick final
bool buttonPressed(const unsigned char no) const A_WARN_UNUSED;
bool isUp() const noexcept2 A_WARN_UNUSED
- { return mEnabled && (mDirection & UP); }
+ { return mEnabled && ((mDirection & UP) != 0); }
bool isDown() const noexcept2 A_WARN_UNUSED
- { return mEnabled && (mDirection & DOWN); }
+ { return mEnabled && ((mDirection & DOWN) != 0); }
bool isLeft() const noexcept2 A_WARN_UNUSED
- { return mEnabled && (mDirection & LEFT); }
+ { return mEnabled && ((mDirection & LEFT) != 0); }
bool isRight() const noexcept2 A_WARN_UNUSED
- { return mEnabled && (mDirection & RIGHT); }
+ { return mEnabled && ((mDirection & RIGHT) != 0); }
int getNumber() const noexcept2 A_WARN_UNUSED
{ return mNumber; }