diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-01-26 22:39:41 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-01-26 22:39:41 +0300 |
commit | 49c2589427e0f81bea68ccba1a95c6890e10538d (patch) | |
tree | 0633bc052552831b3860d1d4816bbee7b85d6313 /include/hmap.h | |
parent | 4665a620775da64ec7280762979a9fc6fa37c0bc (diff) | |
download | roscha-49c2589427e0f81bea68ccba1a95c6890e10538d.tar.gz roscha-49c2589427e0f81bea68ccba1a95c6890e10538d.zip |
auto-formatted the code with clang-format.
Diffstat (limited to 'include/hmap.h')
-rw-r--r-- | include/hmap.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/hmap.h b/include/hmap.h index fa24982..7735c53 100644 --- a/include/hmap.h +++ b/include/hmap.h @@ -12,9 +12,9 @@ typedef void (hmap_cb)(const struct slice *key, void *value); struct hmap { - struct hnode **buckets; - size_t cap; - size_t size; + struct hnode **buckets; + size_t cap; + size_t size; }; struct hmap_iter; @@ -24,9 +24,9 @@ struct hmap *hmap_new_with_cap(size_t cap); #define hmap_new() hmap_new_with_cap(HASHMAP_CAP) -/* +/* * Inserts a key-value pair into the map. Returns NULL if map did not have key, - * old value if it did. + * old value if it did. */ void *hmap_sets(struct hmap *hm, struct slice key, void *value); @@ -39,7 +39,7 @@ void *hmap_gets(struct hmap *hm, const struct slice *key); /* Same as hmap_gets but pass a C string instead */ void *hmap_get(struct hmap *hm, const char *key); -/* +/* * Removes a key from the map, returning the value at the key if the key was * previously in the map. */ @@ -56,7 +56,7 @@ struct hmap_iter *hmap_iter_new(struct hmap *); /* Get the next key, value */ bool hmap_iter_next(struct hmap_iter *iter, const struct slice **key, - void **value); + void **value); #define hmap_iter_foreach(it, k, v) while (hmap_iter_next(it, k, v)) |