mirror of https://github.com/AxioDL/metaforce.git
AROTBuilder: Eliminate variable shadowing
This commit is contained in:
parent
a2709f1d20
commit
84141eeb25
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue