Add rewriting support
[satune.git] / src / Collections / array.h
index 19a22b3cdb7c947a70204f05623dfd53aa9a8212..f823d8c43119014f513e23a03b94acf9ba5a0377 100644 (file)
                memcpy(tmp->array, array, size * sizeof(type));                                                                                 \
                return tmp;                                                         \
        }                                                                     \
-       static inline type getArray ## name(Array ## name * This, uint index) {                 \
+       static inline void removeElementArray ## name(Array ## name * This, uint index) { \
+               This->size--;                                                                                                                                                                                                                           \
+               for(;index<This->size;index++) {                                                                                                                                                \
+                       This->array[index]=This->array[index+1];                                                                                                        \
+               }                                                                                                                                                                                                                                                                               \
+       }                                                                                                                                                                                                                                                                                       \
+       static inline type getArray ## name(Array ## name * This, uint index) { \
                return This->array[index];                                                                                                                                                                      \
        }                                                                     \
        static inline void setArray ## name(Array ## name * This, uint index, type item) {      \