mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +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:
@@ -6515,7 +6515,7 @@ void buf_copy_options(buf_T *buf, int flags)
|
||||
}
|
||||
|
||||
if (should_copy || (flags & BCO_ALWAYS)) {
|
||||
memset(buf->b_p_script_ctx, 0, sizeof(buf->b_p_script_ctx));
|
||||
CLEAR_FIELD(buf->b_p_script_ctx);
|
||||
init_buf_opt_idx();
|
||||
// Don't copy the options specific to a help buffer when
|
||||
// BCO_NOHELP is given or the options were initialized already
|
||||
|
Reference in New Issue
Block a user