summaryrefslogtreecommitdiff
path: root/src/guichan/widget.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-26 21:29:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-26 21:29:59 +0300
commita33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (patch)
tree1b1e98a615e2c03641c99b66cb4667b56f7087c3 /src/guichan/widget.cpp
parent012a10fd8153f3ddb775dde1e4dba4456f2aa9de (diff)
downloadmanaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.gz
manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.bz2
manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.xz
manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.zip
Add const to some classes.
Diffstat (limited to 'src/guichan/widget.cpp')
-rw-r--r--src/guichan/widget.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp
index efeb80486..8b68b8510 100644
--- a/src/guichan/widget.cpp
+++ b/src/guichan/widget.cpp
@@ -110,14 +110,13 @@ namespace gcn
void Widget::drawFrame(Graphics* graphics)
{
- Color faceColor = getBaseColor();
- Color highlightColor, shadowColor;
- int alpha = getBaseColor().a;
- int width = getWidth() + getFrameSize() * 2 - 1;
- int height = getHeight() + getFrameSize() * 2 - 1;
- highlightColor = faceColor + 0x303030;
+ const Color faceColor = getBaseColor();
+ Color highlightColor = faceColor + 0x303030;
+ Color shadowColor = faceColor - 0x303030;
+ const int alpha = getBaseColor().a;
+ const int width = getWidth() + getFrameSize() * 2 - 1;
+ const int height = getHeight() + getFrameSize() * 2 - 1;
highlightColor.a = alpha;
- shadowColor = faceColor - 0x303030;
shadowColor.a = alpha;
for (unsigned int i = 0; i < getFrameSize(); ++i)
@@ -204,7 +203,7 @@ namespace gcn
void Widget::setDimension(const Rectangle& dimension)
{
- Rectangle oldDimension = mDimension;
+ const Rectangle oldDimension = mDimension;
mDimension = dimension;
if (mDimension.width != oldDimension.width