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/tabs/setuptabscroll.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/widgets/tabs/setuptabscroll.cpp')
-rw-r--r-- | src/gui/widgets/tabs/setuptabscroll.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp index 898db7b3e..0cb623687 100644 --- a/src/gui/widgets/tabs/setuptabscroll.cpp +++ b/src/gui/widgets/tabs/setuptabscroll.cpp @@ -72,7 +72,7 @@ void SetupTabScroll::clear() void SetupTabScroll::addControl(SetupItem *const widget) { - if (!widget) + if (widget == nullptr) return; const std::string actionId = widget->getActionEventId(); if (!actionId.empty()) @@ -109,7 +109,7 @@ void SetupTabScroll::apply() iter = mItems.begin(), iter_end = mItems.end(); iter != iter_end; ++ iter) { - if ((*iter).second) + if ((*iter).second != nullptr) (*iter).second->apply((*iter).first); } } @@ -120,7 +120,7 @@ void SetupTabScroll::cancel() iter = mItems.begin(), iter_end = mItems.end(); iter != iter_end; ++ iter) { - if ((*iter).second) + if ((*iter).second != nullptr) (*iter).second->cancel((*iter).first); } } @@ -132,7 +132,7 @@ void SetupTabScroll::externalUpdated() iter != iter_end; ++ iter) { SetupItem *const widget = (*iter).second; - if (widget && widget->isMainConfig() == MainConfig_false) + if ((widget != nullptr) && widget->isMainConfig() == MainConfig_false) widget->externalUpdated((*iter).first); } } @@ -144,7 +144,7 @@ void SetupTabScroll::externalUnloaded() iter != iter_end; ++ iter) { SetupItem *const widget = (*iter).second; - if (widget && widget->isMainConfig() == MainConfig_false) + if ((widget != nullptr) && widget->isMainConfig() == MainConfig_false) widget->externalUnloaded((*iter).first); } } @@ -158,6 +158,6 @@ void SetupTabScroll::widgetResized(const Event &event A_UNUSED) void SetupTabScroll::reread(const std::string &name) { SetupItem *const item = mItems[name + "Event"]; - if (item) + if (item != nullptr) item->rereadValue(); } |