mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 04:00:32 +01:00
util: Use set_foreach instead of rolling our own
This follows the same pattern as in the hash_table. Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
This commit is contained in:
parent
5f129c05e6
commit
03e37ec6d7
1 changed files with 2 additions and 6 deletions
|
|
@ -230,12 +230,8 @@ set_rehash(struct set *ht, unsigned new_size_index)
|
|||
ht->entries = 0;
|
||||
ht->deleted_entries = 0;
|
||||
|
||||
for (entry = old_ht.table;
|
||||
entry != old_ht.table + old_ht.size;
|
||||
entry++) {
|
||||
if (entry_is_present(entry)) {
|
||||
set_add(ht, entry->hash, entry->key);
|
||||
}
|
||||
set_foreach(&old_ht, entry) {
|
||||
set_add(ht, entry->hash, entry->key);
|
||||
}
|
||||
|
||||
ralloc_free(old_ht.table);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue