diff --git a/include/list/typed_list.h b/include/list/typed_list.h index 24ea203..eeabe52 100644 --- a/include/list/typed_list.h +++ b/include/list/typed_list.h @@ -44,6 +44,10 @@ LP->items[(LP->count)++] = ITEM; \ } while (0) +#define list_remove(LP, IDX) \ + do { \ + LP->items[IDX] = LP->items[(LP->count)--]; \ + } while (0) #define list_pop(LP) (LP->count -= 1) #define list_get(LP, IDX) LP->items[IDX]