mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Use remove_i_from_array in a few more places
Also simplify the REMOVER macro
This commit is contained in:
7
glfw/internal.h
vendored
7
glfw/internal.h
vendored
@@ -197,11 +197,12 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void);
|
||||
#endif
|
||||
|
||||
#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))); \
|
||||
}}
|
||||
|
||||
|
||||
// Constructs a version number string from the public header macros
|
||||
#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r
|
||||
#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)
|
||||
|
||||
Reference in New Issue
Block a user