mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +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:
@@ -5789,7 +5789,7 @@ static void str_to_reg(yankreg_T *y_ptr, MotionType yank_type, const char_u *str
|
||||
|
||||
void clear_oparg(oparg_T *oap)
|
||||
{
|
||||
memset(oap, 0, sizeof(oparg_T));
|
||||
CLEAR_POINTER(oap);
|
||||
}
|
||||
|
||||
/// Count the number of bytes, characters and "words" in a line.
|
||||
|
Reference in New Issue
Block a user