summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-18 01:51:36 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-18 01:51:36 +0300
commitf0e95132f27ceb901fbd779fafc798a1f67a06a6 (patch)
tree52ee9ab21f4e01c2c8ae70b86841b0138349645d /src/gui/widgets/textbox.cpp
parent7e0a97d2521b9ce57003176e82a0b5564aa003c2 (diff)
downloadplus-f0e95132f27ceb901fbd779fafc798a1f67a06a6.tar.gz
plus-f0e95132f27ceb901fbd779fafc798a1f67a06a6.tar.bz2
plus-f0e95132f27ceb901fbd779fafc798a1f67a06a6.tar.xz
plus-f0e95132f27ceb901fbd779fafc798a1f67a06a6.zip
Another warning fixes.
Diffstat (limited to 'src/gui/widgets/textbox.cpp')
-rw-r--r--src/gui/widgets/textbox.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index b40a7dcb1..cd5b4bf99 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -177,7 +177,8 @@ void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
}
else
{
- mCaretColumn = mTextRows[mCaretRow].size();
+ mCaretColumn = static_cast<int>(
+ mTextRows[mCaretRow].size());
}
}
break;
@@ -192,11 +193,12 @@ void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
if (mCaretRow >= static_cast<int>(mTextRows.size()))
{
- mCaretRow = mTextRows.size() - 1;
+ mCaretRow = static_cast<int>(mTextRows.size()) - 1;
if (mCaretRow < 0)
mCaretRow = 0;
- mCaretColumn = mTextRows[mCaretRow].size();
+ mCaretColumn = static_cast<int>(
+ mTextRows[mCaretRow].size());
}
else
{
@@ -223,7 +225,7 @@ void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
}
case Input::KEY_GUI_END:
{
- mCaretColumn = mTextRows[mCaretRow].size();
+ mCaretColumn = static_cast<int>(mTextRows[mCaretRow].size());
break;
}
@@ -250,7 +252,8 @@ void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
}
else if (mCaretColumn == 0 && mCaretRow != 0 && mEditable)
{
- mCaretColumn = mTextRows[mCaretRow - 1].size();
+ mCaretColumn = static_cast<int>(
+ mTextRows[mCaretRow - 1].size());
mTextRows[mCaretRow - 1] += mTextRows[mCaretRow];
mTextRows.erase(mTextRows.begin() + mCaretRow);
--mCaretRow;
@@ -303,7 +306,7 @@ void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
mCaretRow += rowsPerPage;
if (mCaretRow >= static_cast<int>(mTextRows.size()))
- mCaretRow = mTextRows.size() - 1;
+ mCaretRow = static_cast<int>(mTextRows.size()) - 1;
}
break;
}