summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/setup_joystick.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/gui/widgets/tabs/setup_joystick.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/widgets/tabs/setup_joystick.cpp')
-rw-r--r--src/gui/widgets/tabs/setup_joystick.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp
index 784197eb9..12cf331a0 100644
--- a/src/gui/widgets/tabs/setup_joystick.cpp
+++ b/src/gui/widgets/tabs/setup_joystick.cpp
@@ -73,7 +73,7 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) :
mNamesDropDown->setActionEventId("name");
mNamesDropDown->addActionListener(this);
- if (joystick)
+ if (joystick != nullptr)
{
mNamesDropDown->setSelected(joystick->getNumber());
}
@@ -113,12 +113,12 @@ void Setup_Joystick::action(const ActionEvent &event)
}
else if (source == mNamesDropDown)
{
- if (joystick)
+ if (joystick != nullptr)
joystick->setNumber(mNamesDropDown->getSelected());
}
else if (source == mDetectButton)
{
- if (joystick)
+ if (joystick != nullptr)
{
joystick->reload();
Joystick::getNames(mNamesModel->getNames());
@@ -127,7 +127,7 @@ void Setup_Joystick::action(const ActionEvent &event)
}
else
{
- if (!joystick)
+ if (joystick == nullptr)
return;
if (joystick->isCalibrating())
@@ -155,7 +155,7 @@ void Setup_Joystick::setTempEnabled(const bool sel)
{
Joystick::setEnabled(sel);
mCalibrateButton->setEnabled(sel);
- if (joystick)
+ if (joystick != nullptr)
{
if (sel)
joystick->open();
@@ -166,7 +166,7 @@ void Setup_Joystick::setTempEnabled(const bool sel)
void Setup_Joystick::cancel()
{
- if (joystick)
+ if (joystick != nullptr)
joystick->setEnabled(mOriginalJoystickEnabled);
if (mOriginalJoystickEnabled != mJoystickEnabled->isSelected())
@@ -177,7 +177,7 @@ void Setup_Joystick::cancel()
void Setup_Joystick::apply()
{
- if (!joystick)
+ if (joystick == nullptr)
return;
config.setValue("joystickEnabled", joystick->isEnabled());