From cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 16 Sep 2012 19:28:16 +0300 Subject: Add const to variables with type size_t. --- src/gui/widgets/textbox.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/widgets/textbox.cpp') diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index 541308e5e..3254f9f28 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -52,13 +52,12 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension) mMinWidth = minDimension; std::stringstream wrappedStream; - size_t spacePos; size_t newlinePos; size_t lastNewlinePos = 0; int minWidth = 0; int xpos; - spacePos = text.rfind(" ", text.size()); + size_t spacePos = text.rfind(" ", text.size()); if (spacePos != std::string::npos) { -- cgit v1.2.3-70-g09d2