aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-03 12:18:35 +0000
committergingerBill <bill@gingerbill.org>2023-01-03 12:18:35 +0000
commit747a11a954824da7960a247299986f56d1316773 (patch)
treed3ac481d2293ad641adcb9bc0fbe549829a0b43f /src/types.cpp
parent252be0fb417f9cdde5e9c4b348cd995a20433aea (diff)
Allow all set entry types to be implicitly cast to their key/value type to allow for easier iteration
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 1e2d85ac6..d33c36e94 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -823,8 +823,7 @@ gb_internal 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 (auto const &entry : *s) {
- Type *f = entry.ptr;
+ for (Type *f : *s) {
if (are_types_identical(t, f)) {
ptr_set_add(s, t);
return true;