summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-16 19:28:16 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-16 19:28:16 +0300
commitcd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96 (patch)
treefdda7e2c3d93b35771f6eb79c22dce9301082f19 /src/gui/widgets/browserbox.cpp
parentf8fc3380197c078a6dcff02351d835c3022411e1 (diff)
downloadplus-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.tar.gz
plus-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.tar.bz2
plus-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.tar.xz
plus-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.zip
Add const to variables with type size_t.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index c657d1e0e..18a9df3e2 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -121,8 +121,8 @@ void BrowserBox::addRow(const std::string &row, const bool atTop)
const int sz = static_cast<int>(mTextRows.size());
while (idx1 != std::string::npos)
{
- size_t idx2 = tmp.find("|", idx1);
- size_t idx3 = tmp.find("@@", idx2);
+ const size_t idx2 = tmp.find("|", idx1);
+ const size_t idx3 = tmp.find("@@", idx2);
if (idx2 == std::string::npos || idx3 == std::string::npos)
break;
@@ -560,7 +560,7 @@ int BrowserBox::calcHeight()
}
}
- size_t len = (end == std::string::npos) ? end : end - start;
+ const size_t len = (end == std::string::npos) ? end : end - start;
if (start >= row.length())
break;