diff options
Diffstat (limited to 'src/guichan/widgets/scrollarea.cpp')
-rw-r--r-- | src/guichan/widgets/scrollarea.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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) |