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/scrollarea.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/guichan/widgets/scrollarea.cpp') diff --git a/src/guichan/widgets/scrollarea.cpp b/src/guichan/widgets/scrollarea.cpp index 7dc7566c0..574308b7c 100644 --- a/src/guichan/widgets/scrollarea.cpp +++ b/src/guichan/widgets/scrollarea.cpp @@ -138,12 +138,12 @@ namespace gcn ScrollArea::~ScrollArea() { - setContent(NULL); + setContent(nullptr); } void ScrollArea::setContent(Widget* widget) { - if (widget != NULL) + if (widget) { clear(); add(widget); @@ -162,7 +162,7 @@ namespace gcn if (!mWidgets.empty()) return *mWidgets.begin(); - return NULL; + return nullptr; } void ScrollArea::setHorizontalScrollPolicy(ScrollPolicy hPolicy) @@ -240,7 +240,7 @@ namespace gcn { checkPolicies(); - if (getContent() == NULL) + if (!getContent()) return 0; int value = getContent()->getWidth() - getChildrenArea().width + @@ -256,7 +256,7 @@ namespace gcn { checkPolicies(); - if (getContent() == NULL) + if (!getContent()) return 0; int value; @@ -790,7 +790,7 @@ namespace gcn setVerticalScrollAmount(getVerticalScrollAmount()); setHorizontalScrollAmount(getHorizontalScrollAmount()); - if (getContent() != NULL) + if (getContent()) { getContent()->setPosition(-mHScroll + getContent()->getFrameSize(), -mVScroll + getContent()->getFrameSize()); @@ -1126,7 +1126,7 @@ namespace gcn if (getChildrenArea().isPointInRect(x, y)) return getContent(); - return NULL; + return nullptr; } void ScrollArea::mouseWheelMovedUp(MouseEvent& mouseEvent) -- cgit v1.2.3-70-g09d2