summaryrefslogtreecommitdiff
path: root/src/resources/dye.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/resources/dye.cpp
parentf8fc3380197c078a6dcff02351d835c3022411e1 (diff)
downloadmv-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.tar.gz
mv-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.tar.bz2
mv-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.tar.xz
mv-cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96.zip
Add const to variables with type size_t.
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r--src/resources/dye.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index 4cedafd4e..4b5c1268c 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -282,10 +282,11 @@ Dye::Dye(const std::string &description)
if (description.empty())
return;
- size_t next_pos = 0, length = description.length();
+ size_t next_pos = 0;
+ const size_t length = description.length();
do
{
- size_t pos = next_pos;
+ const size_t pos = next_pos;
next_pos = description.find(';', pos);
if (next_pos == std::string::npos)
@@ -367,7 +368,7 @@ void Dye::instantiate(std::string &target, const std::string &palettes)
size_t last_pos = target.length(), pal_pos = 0;
do
{
- size_t pos = next_pos;
+ const size_t pos = next_pos;
next_pos = target.find(';', pos);
if (next_pos == std::string::npos)
@@ -375,7 +376,7 @@ void Dye::instantiate(std::string &target, const std::string &palettes)
if (next_pos == pos + 1 && pal_pos != std::string::npos)
{
- size_t pal_next_pos = palettes.find(';', pal_pos);
+ const size_t pal_next_pos = palettes.find(';', pal_pos);
s << target[pos] << ':';
if (pal_next_pos == std::string::npos)
{