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/basiccontainer.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | mv-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/gui/widgets/basiccontainer.cpp')
-rw-r--r-- | src/gui/widgets/basiccontainer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp index 68f440fcf..771ba83f4 100644 --- a/src/gui/widgets/basiccontainer.cpp +++ b/src/gui/widgets/basiccontainer.cpp @@ -234,7 +234,7 @@ void BasicContainer::setFocusHandler(FocusHandler *restrict2 const { Widget::setFocusHandler(focusHandler); - if (mInternalFocusHandler) + if (mInternalFocusHandler != nullptr) return; FOR_EACH (WidgetListConstIterator, iter, mWidgets) @@ -243,13 +243,13 @@ void BasicContainer::setFocusHandler(FocusHandler *restrict2 const void BasicContainer::add(Widget *const widget) restrict2 { - if (!widget) + if (widget == nullptr) return; mWidgets.push_back(widget); if (widget->isAllowLogic()) mLogicWidgets.push_back(widget); - if (!mInternalFocusHandler) + if (mInternalFocusHandler == nullptr) widget->setFocusHandler(getFocusHandler()); else widget->setFocusHandler(mInternalFocusHandler); @@ -260,7 +260,7 @@ void BasicContainer::add(Widget *const widget) restrict2 void BasicContainer::remove(Widget *const restrict widget) restrict2 { - if (!widget) + if (widget == nullptr) return; FOR_EACH (WidgetListIterator, iter, mWidgets) { @@ -391,7 +391,7 @@ void BasicContainer::logicChildren() restrict2 void BasicContainer::showWidgetPart(Widget *restrict const widget, const Rect &restrict area) restrict2 { - if (!widget) + if (widget == nullptr) return; const Rect widgetArea = getChildrenArea(); @@ -417,7 +417,7 @@ void BasicContainer::setInternalFocusHandler(FocusHandler *const restrict { Widget::setInternalFocusHandler(focusHandler); - FocusHandler *const restrict handler = mInternalFocusHandler ? + FocusHandler *const restrict handler = mInternalFocusHandler != nullptr ? mInternalFocusHandler : getFocusHandler(); FOR_EACH (WidgetListConstIterator, iter, mWidgets) { |