aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hashtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/hashtab.c')
-rw-r--r--src/nvim/hashtab.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c
index 475666be5e..a8a998a361 100644
--- a/src/nvim/hashtab.c
+++ b/src/nvim/hashtab.c
@@ -24,8 +24,7 @@
#include <string.h>
#include "nvim/ascii_defs.h"
-#include "nvim/func_attr.h"
-#include "nvim/gettext.h"
+#include "nvim/gettext_defs.h"
#include "nvim/hashtab.h"
#include "nvim/memory.h"
#include "nvim/message.h"
@@ -122,7 +121,7 @@ hashitem_T *hash_lookup(const hashtab_T *const ht, const char *const key, const
{
#ifdef HT_DEBUG
hash_count_lookup++;
-#endif // ifdef HT_DEBUG
+#endif
// Quickly handle the most common situations:
// - return if there is no item at all
@@ -155,7 +154,7 @@ hashitem_T *hash_lookup(const hashtab_T *const ht, const char *const key, const
#ifdef HT_DEBUG
// count a "miss" for hashtab lookup
hash_count_perturb++;
-#endif // ifdef HT_DEBUG
+#endif
idx = 5 * idx + perturb + 1;
hi = &ht->ht_array[idx & ht->ht_mask];
@@ -190,7 +189,7 @@ void hash_debug_results(void)
(int64_t)hash_count_perturb);
fprintf(stderr, "Percentage of perturb loops: %" PRId64 "%%\r\n",
(int64_t)(hash_count_perturb * 100 / hash_count_lookup));
-#endif // ifdef HT_DEBUG
+#endif
}
/// Add (empty) item for key `key` to hashtable `ht`.
@@ -288,7 +287,7 @@ static void hash_may_resize(hashtab_T *ht, size_t minitems)
if (ht->ht_filled >= ht->ht_mask + 1) {
emsg("hash_may_resize(): table completely filled");
}
-#endif // ifdef HT_DEBUG
+#endif
size_t minsize;
const size_t oldsize = ht->ht_mask + 1;