From 405da5f84b072ea97b69359454899f45d92d24b6 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 22 May 2024 00:00:29 +0200 Subject: WIP LSP client This contains the start of an LSP client. Nothing (except starting the LSP server) works at the moment and the feature is disabled by default. --- src/dged/hashmap.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/dged/hashmap.h') diff --git a/src/dged/hashmap.h b/src/dged/hashmap.h index 405c193..b8475c7 100644 --- a/src/dged/hashmap.h +++ b/src/dged/hashmap.h @@ -66,16 +66,16 @@ } \ var = res != NULL ? &(res->value) : NULL; -#define HASHMAP_CONTAINS_KEY(map, key) \ - uint32_t needle = (map)->hash_fn(key); \ +#define HASHMAP_CONTAINS_KEY(map, type, k, var) \ + uint32_t needle = (map)->hash_fn(k); \ bool exists = false; \ - VEC_FOR_EACH((map)->entries, struct pair *pair) { \ + VEC_FOR_EACH(&(map)->entries, type *pair) { \ if (needle == pair->key) { \ exists = true; \ break; \ } \ } \ - exists + var = exists; #define HASHMAP_FOR_EACH(map, var) VEC_FOR_EACH_INDEXED(&(map)->entries, var, i) -- cgit v1.2.3