mesa: Add string_to_uint_map::clear method to clear the map
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 11 Oct 2011 22:25:00 +0000 (15:25 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Nov 2011 21:33:15 +0000 (13:33 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
src/mesa/program/hash_table.h

index 941d28a4ce9dd443d352068b0ef392da53d69efa..47c37ae40ec88b9cf20da777f940b87407bdd6b7 100644 (file)
@@ -213,6 +213,14 @@ public:
       hash_table_dtor(this->ht);
    }
 
+   /**
+    * Remove all mappings from this map.
+    */
+   void clear()
+   {
+      hash_table_clear(this->ht);
+   }
+
    /**
     * Get the value associated with a particular key
     *