diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-23 02:46:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-23 02:48:43 +0300 |
commit | a69a87c5a81ddbf25a25c5549259da550d207bda (patch) | |
tree | 59f1a919b327912395ab84bab1684118bf0379be /src/guichan/widgets/scrollarea.cpp | |
parent | e646f2fae3f323b7faa26aa9540524d1765211ee (diff) | |
download | manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2 manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.zip |
Improve a bit iterators again.
Diffstat (limited to 'src/guichan/widgets/scrollarea.cpp')
-rw-r--r-- | src/guichan/widgets/scrollarea.cpp | 28 |
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); |