summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popuplist.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/popuplist.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/popuplist.cpp')
-rw-r--r--src/gui/widgets/popuplist.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp
index d623fd811..0260945ce 100644
--- a/src/gui/widgets/popuplist.cpp
+++ b/src/gui/widgets/popuplist.cpp
@@ -61,7 +61,7 @@ void PopupList::postInit()
Popup::postInit();
add(mScrollArea);
- if (gui)
+ if (gui != nullptr)
gui->addGlobalFocusListener(this);
addKeyListener(mDropDown);
@@ -71,9 +71,9 @@ void PopupList::postInit()
PopupList::~PopupList()
{
- if (mParent)
+ if (mParent != nullptr)
mParent->removeFocusListener(this);
- if (gui)
+ if (gui != nullptr)
gui->removeGlobalFocusListener(this);
removeKeyListener(mDropDown);
}
@@ -105,7 +105,7 @@ void PopupList::widgetResized(const Event &event)
void PopupList::setSelected(const int selected)
{
- if (!mListBox)
+ if (mListBox == nullptr)
return;
mListBox->setSelected(selected);
@@ -113,7 +113,7 @@ void PopupList::setSelected(const int selected)
int PopupList::getSelected() const
{
- if (!mListBox)
+ if (mListBox == nullptr)
return -1;
return mListBox->getSelected();
@@ -121,7 +121,7 @@ int PopupList::getSelected() const
void PopupList::setListModel(ListModel *const model)
{
- if (mListBox)
+ if (mListBox != nullptr)
mListBox->setListModel(model);
mListModel = model;
}
@@ -155,7 +155,7 @@ void PopupList::mouseReleased(MouseEvent& event)
mPressedIndex = -2;
if (event.getSource() == mScrollArea)
return;
- if (mDropDown)
+ if (mDropDown != nullptr)
mDropDown->updateSelection();
setVisible(Visible_false);
if (mModal == Modal_true)
@@ -174,7 +174,7 @@ void PopupList::focusGained(const Event& event)
return;
}
- if (mDropDown)
+ if (mDropDown != nullptr)
mDropDown->updateSelection();
setVisible(Visible_false);
if (mModal == Modal_true)
@@ -183,6 +183,6 @@ void PopupList::focusGained(const Event& event)
void PopupList::focusLost(const Event& event A_UNUSED)
{
- if (mDropDown)
+ if (mDropDown != nullptr)
mDropDown->updateSelection();
}