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/textbox.cpp | |
parent | e646f2fae3f323b7faa26aa9540524d1765211ee (diff) | |
download | manaplus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz manaplus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2 manaplus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz manaplus-a69a87c5a81ddbf25a25c5549259da550d207bda.zip |
Improve a bit iterators again.
Diffstat (limited to 'src/guichan/widgets/textbox.cpp')
-rw-r--r-- | src/guichan/widgets/textbox.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/guichan/widgets/textbox.cpp b/src/guichan/widgets/textbox.cpp index 2c6066976..0103cdb99 100644 --- a/src/guichan/widgets/textbox.cpp +++ b/src/guichan/widgets/textbox.cpp @@ -114,8 +114,6 @@ namespace gcn void TextBox::draw(Graphics* graphics) { - unsigned int i; - if (mOpaque) { graphics->setColor(getBackgroundColor()); @@ -132,7 +130,7 @@ namespace gcn graphics->setColor(getForegroundColor()); graphics->setFont(getFont()); - for (i = 0; i < mTextRows.size(); i++) + for (size_t i = 0; i < mTextRows.size(); i++) { // Move the text one pixel so we can have a caret before a letter. graphics->drawText(mTextRows[i], 1, i * getFont()->getHeight()); @@ -170,9 +168,8 @@ namespace gcn void TextBox::adjustSize() { - unsigned int i; int width = 0; - for (i = 0; i < mTextRows.size(); ++i) + for (size_t i = 0; i < mTextRows.size(); ++i) { int w = getFont()->getWidth(mTextRows[i]); if (width < w) |