aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/hash_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program/hash_table.h')
-rw-r--r--mesalib/src/mesa/program/hash_table.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/mesalib/src/mesa/program/hash_table.h b/mesalib/src/mesa/program/hash_table.h
index 9ec4e40e8..e1c234ea4 100644
--- a/mesalib/src/mesa/program/hash_table.h
+++ b/mesalib/src/mesa/program/hash_table.h
@@ -38,16 +38,17 @@
#include <assert.h>
#include <unistd.h>
-struct hash_table;
struct string_to_uint_map;
-typedef unsigned (*hash_func_t)(const void *key);
-typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
-
#ifdef __cplusplus
extern "C" {
#endif
+struct hash_table;
+
+typedef unsigned (*hash_func_t)(const void *key);
+typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
+
/**
* Hash table constructor
*
@@ -215,6 +216,14 @@ public:
}
/**
+ * Remove all mappings from this map.
+ */
+ void clear()
+ {
+ hash_table_clear(this->ht);
+ }
+
+ /**
* Get the value associated with a particular key
*
* \return