From 84141eeb25a53638521aa4edfa2df3ae457e14b0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 31 Mar 2020 07:27:19 -0400 Subject: [PATCH] AROTBuilder: Eliminate variable shadowing --- DataSpec/DNACommon/AROTBuilder.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/DataSpec/DNACommon/AROTBuilder.cpp b/DataSpec/DNACommon/AROTBuilder.cpp index cd54e790d..26eb45743 100644 --- a/DataSpec/DNACommon/AROTBuilder.cpp +++ b/DataSpec/DNACommon/AROTBuilder.cpp @@ -347,18 +347,20 @@ void AROTBuilder::build(std::vector>& 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; + } } }