Allow all set entry types to be implicitly cast to their key/value type to allow for easier iteration

This commit is contained in:
gingerBill
2023-01-03 12:18:35 +00:00
parent 252be0fb41
commit 747a11a954
8 changed files with 50 additions and 50 deletions

View File

@@ -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;