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 941d28a4c..bcf65df7d 100644
--- a/mesalib/src/mesa/program/hash_table.h
+++ b/mesalib/src/mesa/program/hash_table.h
@@ -37,16 +37,17 @@
#include <limits.h>
#include <assert.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
*
@@ -214,6 +215,14 @@ public:
}
/**
+ * Remove all mappings from this map.
+ */
+ void clear()
+ {
+ hash_table_clear(this->ht);
+ }
+
+ /**
* Get the value associated with a particular key
*
* \return