summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/scrollarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
commit9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch)
treec084bdf8afabc6220779645dcb5dbf71af6a151f /src/guichan/widgets/scrollarea.cpp
parentbc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff)
downloadmanaverse-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/widgets/scrollarea.cpp')
-rw-r--r--src/guichan/widgets/scrollarea.cpp14
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)