summaryrefslogtreecommitdiff
path: root/src/guichan
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-04 17:49:59 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-04 17:49:59 +0300
commita2bfd50be766b3303f3e8dead3b42d16c60f6081 (patch)
tree9b1e8ab888c2c45350369c132df180a1fb63c975 /src/guichan
parent4b2cb3433c82ba4ba28be8de82e0a49df7f3e388 (diff)
downloadplus-a2bfd50be766b3303f3e8dead3b42d16c60f6081.tar.gz
plus-a2bfd50be766b3303f3e8dead3b42d16c60f6081.tar.bz2
plus-a2bfd50be766b3303f3e8dead3b42d16c60f6081.tar.xz
plus-a2bfd50be766b3303f3e8dead3b42d16c60f6081.zip
Fix code style and compilation warnings.
Diffstat (limited to 'src/guichan')
-rw-r--r--src/guichan/widget.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp
index 8ec3a8178..6c02384b9 100644
--- a/src/guichan/widget.cpp
+++ b/src/guichan/widget.cpp
@@ -309,10 +309,10 @@ namespace gcn
bool Widget::isVisible() const
{
- if (getParent() == NULL)
+ if (!mParent)
return mVisible;
else
- return mVisible && getParent()->isVisible();
+ return mVisible && mParent->isVisible();
}
void Widget::setBaseColor(const Color& color)
@@ -436,7 +436,7 @@ namespace gcn
void Widget::getAbsolutePosition(int& x, int& y) const
{
- if (getParent() == NULL)
+ if (!mParent)
{
x = mDimension.x;
y = mDimension.y;
@@ -446,10 +446,11 @@ namespace gcn
int parentX;
int parentY;
- getParent()->getAbsolutePosition(parentX, parentY);
+ mParent->getAbsolutePosition(parentX, parentY);
- x = parentX + mDimension.x + getParent()->getChildrenArea().x;
- y = parentY + mDimension.y + getParent()->getChildrenArea().y;
+ const Rectangle &rect = mParent->getChildrenArea();
+ x = parentX + mDimension.x + rect.x;
+ y = parentY + mDimension.y + rect.y;
}
Font* Widget::getFont() const
@@ -574,10 +575,10 @@ namespace gcn
"the widget to the gui?).");
}
- if (getParent() != NULL)
+ if (mParent)
{
return (mFocusHandler->getModalFocused() == this)
- || getParent()->isModalFocused();
+ || mParent->isModalFocused();
}
return mFocusHandler->getModalFocused() == this;
@@ -591,10 +592,10 @@ namespace gcn
"the widget to the gui?).");
}
- if (getParent() != NULL)
+ if (mParent)
{
return (mFocusHandler->getModalMouseInputFocused() == this)
- || getParent()->isModalMouseInputFocused();
+ || mParent->isModalMouseInputFocused();
}
return mFocusHandler->getModalMouseInputFocused() == this;