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/basiccontainer.cpp | |
parent | bc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff) | |
download | manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2 manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip |
Fix some warnings under gcc 4.7.
Diffstat (limited to 'src/guichan/basiccontainer.cpp')
-rw-r--r-- | src/guichan/basiccontainer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/guichan/basiccontainer.cpp b/src/guichan/basiccontainer.cpp index 439535c9a..a36ab5f9b 100644 --- a/src/guichan/basiccontainer.cpp +++ b/src/guichan/basiccontainer.cpp @@ -173,7 +173,7 @@ namespace gcn Rectangle r = getChildrenArea(); if (!r.isPointInRect(x, y)) - return NULL; + return nullptr; x -= r.x; y -= r.y; @@ -188,7 +188,7 @@ namespace gcn } } - return NULL; + return nullptr; } void BasicContainer::logic() @@ -200,7 +200,7 @@ namespace gcn { Widget::_setFocusHandler(focusHandler); - if (mInternalFocusHandler != NULL) + if (mInternalFocusHandler) return; WidgetListConstIterator iter; @@ -214,7 +214,7 @@ namespace gcn { mWidgets.push_back(widget); - if (mInternalFocusHandler == NULL) + if (!mInternalFocusHandler) widget->_setFocusHandler(_getFocusHandler()); else widget->_setFocusHandler(mInternalFocusHandler); @@ -231,8 +231,8 @@ namespace gcn if (*iter == widget) { mWidgets.erase(iter); - widget->_setFocusHandler(NULL); - widget->_setParent(NULL); + widget->_setFocusHandler(nullptr); + widget->_setParent(nullptr); widget->removeDeathListener(this); return; } @@ -247,8 +247,8 @@ namespace gcn for (iter = mWidgets.begin(); iter != mWidgets.end(); ++ iter) { - (*iter)->_setFocusHandler(NULL); - (*iter)->_setParent(NULL); + (*iter)->_setFocusHandler(nullptr); + (*iter)->_setParent(nullptr); (*iter)->removeDeathListener(this); } @@ -327,7 +327,7 @@ namespace gcn WidgetListConstIterator iter; for (iter = mWidgets.begin(); iter != mWidgets.end(); ++ iter) { - if (mInternalFocusHandler == NULL) + if (!mInternalFocusHandler) (*iter)->_setFocusHandler(_getFocusHandler()); else (*iter)->_setFocusHandler(mInternalFocusHandler); @@ -345,15 +345,15 @@ namespace gcn BasicContainer *basicContainer = dynamic_cast<BasicContainer*>(*iter); - if (basicContainer != NULL) + if (basicContainer) { Widget *widget = basicContainer->findWidgetById(id); - if (widget != NULL) + if (widget) return widget; } } - return NULL; + return nullptr; } } |