From fd00c738c08e54c9dfdc195e59f780f30d2f9e07 Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Fri, 20 Mar 2015 15:13:14 +0200 Subject: mesa/main: Remove _mesa_HashClone() I didn't find this being used anywhere. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Timothy Arceri Reviewed-by: Anuj Phogat --- src/mesa/main/hash.c | 28 ---------------------------- src/mesa/main/hash.h | 3 --- 2 files changed, 31 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index d04cccd94d2..315b5d64004 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -388,34 +388,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table, } -/** - * Clone all entries in a hash table, into a new table. - * - * \param table the hash table to clone - */ -struct _mesa_HashTable * -_mesa_HashClone(const struct _mesa_HashTable *table) -{ - /* cast-away const */ - struct _mesa_HashTable *table2 = (struct _mesa_HashTable *) table; - struct hash_entry *entry; - struct _mesa_HashTable *clonetable; - - assert(table); - mtx_lock(&table2->Mutex); - - clonetable = _mesa_NewHashTable(); - assert(clonetable); - hash_table_foreach(table->ht, entry) { - _mesa_HashInsert(clonetable, (GLint)(uintptr_t)entry->key, entry->data); - } - - mtx_unlock(&table2->Mutex); - - return clonetable; -} - - /** * Walk over all entries in a hash table, calling callback function for each. * Note: we use a separate mutex in this function to avoid a recursive diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h index e3e8f492e8b..da3b9973d24 100644 --- a/src/mesa/main/hash.h +++ b/src/mesa/main/hash.h @@ -59,9 +59,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table, void (*callback)(GLuint key, void *data, void *userData), void *userData); -extern struct _mesa_HashTable * -_mesa_HashClone(const struct _mesa_HashTable *table); - extern void _mesa_HashWalk(const struct _mesa_HashTable *table, void (*callback)(GLuint key, void *data, void *userData), -- cgit v1.2.3