Use remove_i_from_array in a few more places

Also simplify the REMOVER macro
This commit is contained in:
Kovid Goyal
2019-06-07 14:25:33 +05:30
parent 4a55eb9e7f
commit 656916e0fa
4 changed files with 15 additions and 24 deletions
+3 -3
View File
@@ -259,9 +259,9 @@ typedef struct {FONTS_DATA_HEAD} *FONTS_DATA_HANDLE;
}
#define remove_i_from_array(array, i, count) { \
count--; \
if (i < count) { \
memmove(array + i, array + i + 1, sizeof(array[0]) * (count - i)); \
(count)--; \
if ((i) < (count)) { \
memmove((array) + (i), (array) + (i) + 1, sizeof((array)[0]) * ((count) - (i))); \
}}
// Global functions