mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
Replace ga->ga_len > 0 checks with !GA_EMPTY(ga)
Used Coccinelle to perform the changes ```diff @@ expression E; @@ <... ( - E.ga_len > 0 + !GA_EMPTY(&E) | - E->ga_len > 0 + !GA_EMPTY(E) ) ...> ``` `spatch --in-place --sp-file ga_empty.cocci <C_FILE>`
This commit is contained in:

committed by
Thiago de Arruda

parent
659cd0e99a
commit
b4efff6523
@@ -16,6 +16,8 @@ typedef struct growarray {
|
||||
|
||||
#define GA_EMPTY_INIT_VALUE { 0, 0, 0, 0, NULL }
|
||||
|
||||
#define GA_EMPTY(ga_ptr) ((ga_ptr)->ga_len <= 0)
|
||||
|
||||
void ga_clear(garray_T *gap);
|
||||
void ga_clear_strings(garray_T *gap);
|
||||
void ga_init(garray_T *gap, int itemsize, int growsize);
|
||||
|
Reference in New Issue
Block a user