mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 07:13:14 +00:00
Replace compiler for loops for the hash-table types to simplify code usage
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user