From 36ba43d6ea38062b17f7e63ef659962bfc51c64d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jun 2017 23:34:34 +0300 Subject: Fix clang-tidy check readability-implicit-bool-cast. --- src/gui/widgets/tabstrip.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/tabstrip.cpp') 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(widget); - if (!button) + if (button == nullptr) return; if (button->isPressed2()) { -- cgit v1.2.3-70-g09d2