summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/textbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-23 02:46:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-23 02:48:43 +0300
commita69a87c5a81ddbf25a25c5549259da550d207bda (patch)
tree59f1a919b327912395ab84bab1684118bf0379be /src/guichan/widgets/textbox.cpp
parente646f2fae3f323b7faa26aa9540524d1765211ee (diff)
downloadmanaplus-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.cpp7
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)