mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +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:
@@ -2399,7 +2399,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
|
||||
}
|
||||
}
|
||||
|
||||
memset(sattrs, 0, sizeof(sattrs));
|
||||
CLEAR_FIELD(sattrs);
|
||||
num_signs = buf_get_signattrs(wp->w_buffer, lnum, sattrs);
|
||||
decor_redraw_signs(buf, lnum - 1, &num_signs, sattrs);
|
||||
|
||||
|
Reference in New Issue
Block a user