fixup clang range warnings.

This commit is contained in:
Kelvin Sherlock 2020-11-05 18:53:52 -05:00
parent 3480881001
commit c8310c0dbd
2 changed files with 5 additions and 5 deletions

View File

@ -1252,13 +1252,13 @@ void Shell()
// load the error code to error mnemonic
ErrorTableInvert.reserve(ErrorTable.size());
for (const auto kv : ErrorTable) {
for (const auto &kv : ErrorTable) {
ErrorTableInvert.emplace(std::make_pair(kv.second, kv.first));
}
// address to function name.
SymbolTableInvert.reserve(SymbolTable.size());
for (const auto kv : SymbolTable) {
for (const auto &kv : SymbolTable) {
SymbolTableInvert.emplace(std::make_pair(kv.second.first, kv.first));
}

View File

@ -154,7 +154,7 @@ namespace MM
}
// 2. check if it's contained in a pointer
for (const auto kv : PtrMap)
for (const auto &kv : PtrMap)
{
if (address < kv.first) continue;
if (address >= kv.first + kv.second) continue;
@ -184,7 +184,7 @@ namespace MM
// 3. check if the address is within a handle.
{
for (const auto kv : HandleMap)
for (const auto &kv : HandleMap)
{
const HandleInfo &info = kv.second;
@ -1145,7 +1145,7 @@ namespace MM
Log("%04x RecoverHandle(%08x)\n", trap, p);
uint16_t error = MacOS::memBCErr;
for (const auto kv : HandleMap)
for (const auto &kv : HandleMap)
{
const HandleInfo &info = kv.second;