aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/marktree.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-08 13:26:37 +0200
committerGitHub <noreply@github.com>2023-09-08 13:26:37 +0200
commitcc3df63c3ba954962fc1b9ce0503a5379ef0c7d0 (patch)
tree59bd8e97d87fa5da7cc95f290f47b93eaf8dd953 /src/nvim/marktree.c
parent6a8b48e24cbe070846dd1d234553b3fdeb19460e (diff)
parent5970157e1d22fd5e05ae5d3bd949f807fb7a744c (diff)
downloadrneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.gz
rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.tar.bz2
rneovim-cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0.zip
Merge pull request #24985 from bfredl/hash2
refactor(map): enhanced implementation, Clean Codeā„¢, etc etc
Diffstat (limited to 'src/nvim/marktree.c')
-rw-r--r--src/nvim/marktree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/marktree.c b/src/nvim/marktree.c
index 840b6b646e..d07d176b6d 100644
--- a/src/nvim/marktree.c
+++ b/src/nvim/marktree.c
@@ -548,10 +548,8 @@ void marktree_clear(MarkTree *b)
marktree_free_node(b->root);
b->root = NULL;
}
- if (b->id2node->table.keys) {
- map_destroy(uint64_t, b->id2node);
- *b->id2node = (PMap(uint64_t)) MAP_INIT;
- }
+ map_destroy(uint64_t, b->id2node);
+ *b->id2node = (PMap(uint64_t)) MAP_INIT;
b->n_keys = 0;
b->n_nodes = 0;
}