summaryrefslogtreecommitdiff
path: root/src/gui/widgets/icon.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-30 02:10:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-30 02:10:59 +0300
commit46f0755975033f37eaae9db73c0e2b6499c2a923 (patch)
tree5c13c361ce4a4e4fd0e07fca1953c54637965666 /src/gui/widgets/icon.cpp
parent1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (diff)
downloadplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.gz
plus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.bz2
plus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.xz
plus-46f0755975033f37eaae9db73c0e2b6499c2a923.zip
Add const to more classes.
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r--src/gui/widgets/icon.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 9cb42a9f7..e7404ad93 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -36,14 +36,14 @@ Icon::Icon(const std::string &file)
setSize(mImage->mBounds.w, mImage->mBounds.h);
}
-Icon::Icon(Image *image)
+Icon::Icon(Image *const image)
: mImage(image)
{
if (mImage)
setSize(mImage->mBounds.w, mImage->mBounds.h);
}
-void Icon::setImage(Image *image)
+void Icon::setImage(Image *const image)
{
mImage = image;
if (mImage)
@@ -54,7 +54,7 @@ void Icon::draw(gcn::Graphics *g)
{
if (mImage)
{
- Graphics *graphics = static_cast<Graphics*>(g);
+ Graphics *const graphics = static_cast<Graphics*>(g);
const int x = (getWidth() - mImage->mBounds.w) / 2;
const int y = (getHeight() - mImage->mBounds.h) / 2;
graphics->drawImage(mImage, x, y);