From 34a048f7daaf93b16ae4121bf5238f9008f3465b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 9 Dec 2022 11:29:28 +0000 Subject: Replace compiler for loops for the hash-table types to simplify code usage --- src/types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/types.cpp') diff --git a/src/types.cpp b/src/types.cpp index 28628fd97..9bdbf8d86 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -828,8 +828,8 @@ bool type_ptr_set_exists(PtrSet *s, Type *t) { // TODO(bill, 2019-10-05): This is very slow and it's probably a lot // faster to cache types correctly - for_array(i, s->entries) { - Type *f = s->entries[i].ptr; + for (auto const &entry : *s) { + Type *f = entry.ptr; if (are_types_identical(t, f)) { ptr_set_add(s, t); return true; -- cgit v1.2.3