diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
commit | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch) | |
tree | c084bdf8afabc6220779645dcb5dbf71af6a151f /src/guichan/widgets/dropdown.cpp | |
parent | bc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff) | |
download | manaplus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz manaplus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2 manaplus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz manaplus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip |
Fix some warnings under gcc 4.7.
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); } |