summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-10 16:46:55 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-10 16:46:55 +0300
commit608dfae22e1b5145210314ca6c7268420dd639c8 (patch)
tree5f7317be7e895a1f8aede182ea69ef56d456c54f /src/gui/widgets/textbox.cpp
parent9eb389060d44672c311a36348036eab297859e7e (diff)
downloadmanaplus-608dfae22e1b5145210314ca6c7268420dd639c8.tar.gz
manaplus-608dfae22e1b5145210314ca6c7268420dd639c8.tar.bz2
manaplus-608dfae22e1b5145210314ca6c7268420dd639c8.tar.xz
manaplus-608dfae22e1b5145210314ca6c7268420dd639c8.zip
Fix some issues found by automatic checks.
Diffstat (limited to 'src/gui/widgets/textbox.cpp')
-rw-r--r--src/gui/widgets/textbox.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 479349503..edf360b62 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -116,7 +116,7 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension)
mMinWidth = minDimension;
const size_t textSize = text.size();
- size_t spacePos = text.rfind(" ", textSize);
+ size_t spacePos = text.rfind(' ', textSize);
if (spacePos != std::string::npos)
{
@@ -136,7 +136,7 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension)
do
{
// Determine next piece of string to wrap
- newlinePos = text.find("\n", lastNewlinePos);
+ newlinePos = text.find('\n', lastNewlinePos);
if (newlinePos == std::string::npos)
newlinePos = textSize;
@@ -151,7 +151,7 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension)
do
{
- spacePos = line.find(" ", lastSpacePos);
+ spacePos = line.find(' ', lastSpacePos);
if (spacePos == std::string::npos)
spacePos = sz;
@@ -190,7 +190,7 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension)
wrappedStream.clear();
wrappedStream.str("");
lastNewlinePos = 0;
- newlinePos = text.find("\n", lastNewlinePos);
+ newlinePos = text.find('\n', lastNewlinePos);
if (newlinePos == std::string::npos)
newlinePos = textSize;
line = text.substr(lastNewlinePos, newlinePos -
@@ -208,7 +208,7 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension)
}
while (spacePos != sz);
- if (text.find("\n", lastNewlinePos) != std::string::npos)
+ if (text.find('\n', lastNewlinePos) != std::string::npos)
wrappedStream << "\n";
lastNewlinePos = newlinePos + 1;
@@ -240,7 +240,7 @@ void TextBox::setText(const std::string& text)
int length;
do
{
- pos = text.find("\n", lastPos);
+ pos = text.find('\n', lastPos);
if (pos != std::string::npos)
length = CAST_S32(pos - lastPos);