From 9e83411f7e4147d09af5a5006888dcc187ea0ef8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 7 Nov 2011 19:34:52 +0300 Subject: Fix some warnings under gcc 4.7. --- src/guichan/widgets/dropdown.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/guichan/widgets/dropdown.cpp') 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); } -- cgit v1.2.3-70-g09d2