diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-16 19:28:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-16 19:28:16 +0300 |
commit | cd24ed1c6c5aab358b4f18d262bd4c00c0ebfe96 (patch) | |
tree | fdda7e2c3d93b35771f6eb79c22dce9301082f19 /src/resources/dye.cpp | |
parent | f8fc3380197c078a6dcff02351d835c3022411e1 (diff) | |
download | plus-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/resources/dye.cpp')
-rw-r--r-- | src/resources/dye.cpp | 9 |
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) { |