diff options
author | Pavel Janík <Pavel@Janik.cz> | 2016-08-03 19:45:24 +0200 |
---|---|---|
committer | Pavel Janík <Pavel@Janik.cz> | 2016-08-03 20:35:29 +0200 |
commit | cce3024c23aceb097ac32c00f84e613bf94e9995 (patch) | |
tree | 036ee6d0e3ebba3c9271590e25566f3608892a5c /src/blockencodings.h | |
parent | 5c7a5e1f66d8611d84d66c7e0295bd41c71f85bf (diff) |
Do not shadow local variable, cleanup
Diffstat (limited to 'src/blockencodings.h')
-rw-r--r-- | src/blockencodings.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blockencodings.h b/src/blockencodings.h index b980e9e286..349fcbd50f 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -53,11 +53,11 @@ public: } uint16_t offset = 0; - for (size_t i = 0; i < indexes.size(); i++) { - if (uint64_t(indexes[i]) + uint64_t(offset) > std::numeric_limits<uint16_t>::max()) + for (size_t j = 0; j < indexes.size(); j++) { + if (uint64_t(indexes[j]) + uint64_t(offset) > std::numeric_limits<uint16_t>::max()) throw std::ios_base::failure("indexes overflowed 16 bits"); - indexes[i] = indexes[i] + offset; - offset = indexes[i] + 1; + indexes[j] = indexes[j] + offset; + offset = indexes[j] + 1; } } else { for (size_t i = 0; i < indexes.size(); i++) { |