summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/scrollarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/widgets/scrollarea.cpp')
-rw-r--r--src/guichan/widgets/scrollarea.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/guichan/widgets/scrollarea.cpp b/src/guichan/widgets/scrollarea.cpp
index a9d84dd98..c0734a926 100644
--- a/src/guichan/widgets/scrollarea.cpp
+++ b/src/guichan/widgets/scrollarea.cpp
@@ -536,10 +536,9 @@ namespace gcn
graphics->setColor(getForegroundColor());
- int i;
- int w = dim.height / 2;
- int h = w / 2 + 2;
- for (i = 0; i < w / 2; ++i)
+ const int w = dim.height / 2;
+ const int h = w / 2 + 2;
+ for (int i = 0; i < w / 2; ++i)
{
graphics->drawLine(w - i + offset, i + h + offset,
w + i + offset, i + h + offset);
@@ -595,10 +594,9 @@ namespace gcn
graphics->setColor(getForegroundColor());
- int i;
- int w = dim.height / 2;
- int h = w + 1;
- for (i = 0; i < w / 2; ++i)
+ const int w = dim.height / 2;
+ const int h = w + 1;
+ for (int i = 0; i < w / 2; ++i)
{
graphics->drawLine(w - i + offset, -i + h + offset,
w + i + offset, -i + h + offset);
@@ -654,10 +652,9 @@ namespace gcn
graphics->setColor(getForegroundColor());
- int i;
- int w = dim.width / 2;
- int h = w - 2;
- for (i = 0; i < w / 2; ++i)
+ const int w = dim.width / 2;
+ const int h = w - 2;
+ for (int i = 0; i < w / 2; ++i)
{
graphics->drawLine(i + h + offset, w - i + offset,
i + h + offset, w + i + offset);
@@ -713,10 +710,9 @@ namespace gcn
graphics->setColor(getForegroundColor());
- int i;
- int w = dim.width / 2;
- int h = w + 1;
- for (i = 0; i < w / 2; ++i)
+ const int w = dim.width / 2;
+ const int h = w + 1;
+ for (int i = 0; i < w / 2; ++i)
{
graphics->drawLine(-i + h + offset, w - i + offset,
-i + h + offset, w + i + offset);