diff options
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 1.107 2007/08/05 12:11:52 kls Exp $ + * $Id: tools.h 1.108 2007/08/25 14:16:39 kls Exp $ */ #ifndef __TOOLS_H @@ -464,6 +464,12 @@ public: Realloc(allocated * 4 / 2); // increase size by 50% data[size++] = Data; } + virtual void Remove(int Index) + { + if (Index < size - 1) + memmove(&data[Index], &data[Index + 1], (size - Index) * sizeof(T)); + size--; + } virtual void Clear(void) {} void Sort(__compar_fn_t Compare) { |