diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-06 23:34:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-07 19:23:40 +0300 |
commit | 36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch) | |
tree | 190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/widgets/tabstrip.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | plus-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/tabstrip.cpp')
-rw-r--r-- | src/gui/widgets/tabstrip.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp index 1f8db0d5e..2a8299ea1 100644 --- a/src/gui/widgets/tabstrip.cpp +++ b/src/gui/widgets/tabstrip.cpp @@ -50,7 +50,7 @@ Widget *TabStrip::createWidget(const std::string &text, widget->setStick(true); widget->setCaption(text); widget->adjustSize(); - if ((!mCount && mPressFirst) || pressed) + if (((mCount == 0) && mPressFirst) || pressed) widget->setPressed(true); widget->setTag(CAST_S32(mWidgets.size())); return widget; @@ -59,11 +59,11 @@ Widget *TabStrip::createWidget(const std::string &text, void TabStrip::action(const ActionEvent &event) { WidgetGroup::action(event); - if (event.getSource()) + if (event.getSource() != nullptr) { Widget *const widget = event.getSource(); Button *const button = static_cast<Button*>(widget); - if (!button) + if (button == nullptr) return; if (button->isPressed2()) { |