Avoid copying a ref in a loop (#4000)

Avoid triggering a warning from newer Clang, which turns into an error
on macOS.
This commit is contained in:
David Neto 2020-10-29 09:20:45 -04:00 committed by GitHub
parent 5edb328e81
commit 25ee275763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ class CFA {
template <class BB>
bool CFA<BB>::FindInWorkList(const std::vector<block_info>& work_list,
uint32_t id) {
for (auto& b : work_list) {
for (const auto& b : work_list) {
if (b.block->id() == id) return true;
}
return false;