ucx/cx/hash_map.h

changeset 748
49a284f61e8c
parent 747
efbd59642577
child 776
96555c0ed875
--- a/ucx/cx/hash_map.h	Fri Apr 21 21:25:32 2023 +0200
+++ b/ucx/cx/hash_map.h	Sun May 07 11:53:10 2023 +0200
@@ -90,6 +90,22 @@
 );
 
 /**
+ * Creates a new hash map with a default number of buckets.
+ *
+ * If \p item_size is CX_STORE_POINTERS, the created map will be created as if
+ * cxMapStorePointers() was called immediately after creation.
+ *
+ * @note Iterators provided by this hash map implementation provide the remove operation.
+ * The index value of an iterator is the incremented when the iterator advanced without removal.
+ * In other words, when the iterator is finished, \c index==size .
+ *
+ * @param itemsize the size of one element
+ * @return a pointer to the new hash map
+ */
+#define cxHashMapCreateSimple(itemsize) \
+    cxHashMapCreate(cxDefaultAllocator, itemsize, 0)
+
+/**
  * Increases the number of buckets, if necessary.
  *
  * The load threshold is \c 0.75*buckets. If the element count exceeds the load

mercurial