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/browserbox.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/browserbox.cpp') 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(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; -- cgit v1.2.3-60-g2f50