diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-30 19:52:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-30 19:52:16 +0300 |
commit | 88c6a0aa757df0ec38bc67f2cf314f8be3efd0ce (patch) | |
tree | b35a28cd317e2895c063749180b98edfe223c032 /src/gui/widgets/textfield.cpp | |
parent | c24fefa91a1416a4dad7fd97d67cefa51f9eb97c (diff) | |
download | mv-88c6a0aa757df0ec38bc67f2cf314f8be3efd0ce.tar.gz mv-88c6a0aa757df0ec38bc67f2cf314f8be3efd0ce.tar.bz2 mv-88c6a0aa757df0ec38bc67f2cf314f8be3efd0ce.tar.xz mv-88c6a0aa757df0ec38bc67f2cf314f8be3efd0ce.zip |
Fix code style in gui.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index f89d2ead2..342e97ee8 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -253,7 +253,7 @@ void TextField::keyPressed(KeyEvent &event) { std::string str = event.getText(); mText.insert(mCaretPosition, str); - mCaretPosition += str.size(); + mCaretPosition += static_cast<unsigned int>(str.size()); event.consume(); fixScroll(); if (mSendAlwaysEvents) @@ -679,7 +679,7 @@ void TextField::fixScroll() void TextField::setCaretPosition(unsigned int position) { - const unsigned int sz = mText.size(); + const unsigned int sz = static_cast<unsigned int>(mText.size()); if (position > sz) mCaretPosition = static_cast<int>(sz); else @@ -746,7 +746,7 @@ void TextField::setText(const std::string& text) { const size_t sz = text.size(); if (sz < mCaretPosition) - mCaretPosition = sz; + mCaretPosition = static_cast<unsigned int>(sz); mText = text; } |