summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-01-11 15:07:27 -0500
committerNicolai Hähnle <[email protected]>2016-02-03 14:03:35 +0100
commit55fb921d691f6d2d9e1ab105adb63a61fea7dc50 (patch)
treebddb67a6c1016f629a6f9771d166247d3fed0e28 /src/mesa/main
parent8b11d8cfbfaaf72755e6c200140e253cb3e3fa8a (diff)
util/hash_table: add _mesa_hash_table_num_entries
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/hash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
index 315b5d64004..ab1b9e907ae 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -496,14 +496,12 @@ _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys)
GLuint
_mesa_HashNumEntries(const struct _mesa_HashTable *table)
{
- struct hash_entry *entry;
GLuint count = 0;
if (table->deleted_key_data)
count++;
- hash_table_foreach(table->ht, entry)
- count++;
+ count += _mesa_hash_table_num_entries(table->ht);
return count;
}