mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
a80faa8930
This commit is contained in:
@@ -2139,7 +2139,7 @@ static int ins_compl_add_tv(typval_T *const tv, const Direction dir, bool fast)
|
||||
}
|
||||
} else {
|
||||
word = tv_get_string_chk(tv);
|
||||
memset(cptext, 0, sizeof(cptext));
|
||||
CLEAR_FIELD(cptext);
|
||||
}
|
||||
if (word == NULL || (!empty && *word == NUL)) {
|
||||
for (size_t i = 0; i < CPT_COUNT; i++) {
|
||||
|
Reference in New Issue
Block a user