aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-12-09 11:29:28 +0000
committergingerBill <bill@gingerbill.org>2022-12-09 11:29:28 +0000
commit34a048f7daaf93b16ae4121bf5238f9008f3465b (patch)
tree3857fdc80f73522a8b2af265f257a4decd447afd /src/types.cpp
parentffe953b43d1ad31d2c37f544a1d389e30d8f69bf (diff)
Replace compiler for loops for the hash-table types to simplify code usage
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp4
1 files changed, 2 insertions, 2 deletions
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<Type *> *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;