diff options
Diffstat (limited to 'src/guichan/widgets/dropdown.cpp')
-rw-r--r-- | src/guichan/widgets/dropdown.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/guichan/widgets/dropdown.cpp b/src/guichan/widgets/dropdown.cpp index 3ecbd75d8..17513931f 100644 --- a/src/guichan/widgets/dropdown.cpp +++ b/src/guichan/widgets/dropdown.cpp @@ -68,8 +68,8 @@ namespace gcn setInternalFocusHandler(&mInternalFocusHandler); - mInternalScrollArea = (scrollArea == NULL); - mInternalListBox = (listBox == NULL); + mInternalScrollArea = (!scrollArea); + mInternalListBox = (!listBox); if (mInternalScrollArea) mScrollArea = new ScrollArea(); @@ -110,16 +110,16 @@ namespace gcn if (mInternalScrollArea) { delete mScrollArea; - mScrollArea = 0; + mScrollArea = nullptr; } if (mInternalListBox) { delete mListBox; - mListBox = 0; + mListBox = nullptr; } - setInternalFocusHandler(NULL); + setInternalFocusHandler(nullptr); } int DropDown::getSelected() const @@ -223,10 +223,10 @@ namespace gcn void DropDown::adjustHeight() { - if (mScrollArea == NULL) + if (!mScrollArea) throw GCN_EXCEPTION("Scroll area has been deleted."); - if (mListBox == NULL) + if (!mListBox) throw GCN_EXCEPTION("List box has been deleted."); int listBoxHeight = mListBox->getHeight(); @@ -296,7 +296,7 @@ namespace gcn void DropDown::death(const Event& event) { if (event.getSource() == mScrollArea) - mScrollArea = NULL; + mScrollArea = nullptr; BasicContainer::death(event); } |