summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/slider.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/widgets/slider.cpp
parent012a10fd8153f3ddb775dde1e4dba4456f2aa9de (diff)
downloadmv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.gz
mv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.bz2
mv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.xz
mv-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.zip
Add const to some classes.
Diffstat (limited to 'src/guichan/widgets/slider.cpp')
-rw-r--r--src/guichan/widgets/slider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/guichan/widgets/slider.cpp b/src/guichan/widgets/slider.cpp
index 189ee6e7b..ed14f525a 100644
--- a/src/guichan/widgets/slider.cpp
+++ b/src/guichan/widgets/slider.cpp
@@ -209,7 +209,7 @@ namespace gcn
else
w = getHeight();
- double pos = v / (static_cast<double>(w) - getMarkerLength());
+ const double pos = v / (static_cast<double>(w) - getMarkerLength());
return (1.0 - pos) * getScaleStart() + pos * getScaleEnd();
}
@@ -221,7 +221,7 @@ namespace gcn
else
v = getHeight();
- int w = static_cast<int>((v - getMarkerLength())
+ const int w = static_cast<int>((v - getMarkerLength())
* (value - getScaleStart())
/ (getScaleEnd() - getScaleStart()));