AROTBuilder: Eliminate variable shadowing

This commit is contained in:
Lioncash 2020-03-31 07:27:19 -04:00
parent a2709f1d20
commit 84141eeb25
1 changed files with 7 additions and 5 deletions

View File

@ -347,20 +347,22 @@ void AROTBuilder::build(std::vector<std::vector<uint8_t>>& secs, const zeus::CAA
auto bmpIt = bmp.cbegin();
if (bmpIt != bmp.cend()) {
int curIdx = 0;
for (size_t w = 0; w < bmpWordCount; ++w) {
for (int b = 0; b < 32; ++b) {
for (size_t word = 0; word < bmpWordCount; ++word) {
for (u32 b = 0; b < 32; ++b) {
if (*bmpIt == curIdx) {
bmpWords[w] |= 1 << b;
bmpWords[word] |= 1U << b;
++bmpIt;
if (bmpIt == bmp.cend())
if (bmpIt == bmp.cend()) {
break;
}
}
++curIdx;
}
if (bmpIt == bmp.cend())
if (bmpIt == bmp.cend()) {
break;
}
}
}
for (uint32_t word : bmpWords)
w.writeUint32Big(word);