mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Do not shadow local variable, cleanup
This commit is contained in:
parent
5c7a5e1f66
commit
cce3024c23
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user