}
*/
+#include <stdbool.h>
#include <stddef.h>
#include <libpspp/cast.h>
const struct hmap_node *);
/* Counting. */
+static bool hmap_is_empty (const struct hmap *);
static inline size_t hmap_count (const struct hmap *);
static inline size_t hmap_capacity (const struct hmap *);
: hmap_first_nonempty_bucket__ (map, (node->hash & map->mask) + 1));
}
+/* Returns true if MAP currently contains no data items, false
+ otherwise. */
+static inline bool
+hmap_is_empty (const struct hmap *map)
+{
+ return map->count == 0;
+}
+
/* Returns the number of data items currently in MAP. */
static inline size_t
hmap_count (const struct hmap *map)