diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-05-20 14:01:02 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-05-20 14:01:02 +0200 |
commit | d2030debc002d416fb32dc5187e79381ffe5422c (patch) | |
tree | 7dd877e5c6b5325be7baef20c46487379cc0c5a9 /tools.h | |
parent | cdaf99121bb31fff5e11765ab6ad5f61645134fd (diff) | |
download | vdr-d2030debc002d416fb32dc5187e79381ffe5422c.tar.gz vdr-d2030debc002d416fb32dc5187e79381ffe5422c.tar.bz2 |
cVector::Clear() now reinitializes any previously used members
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 4 |
1 files changed, 3 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 2.20 2012/05/19 12:32:32 kls Exp $ + * $Id: tools.h 2.21 2012/05/20 13:58:06 kls Exp $ */ #ifndef __TOOLS_H @@ -540,6 +540,8 @@ public: } virtual void Clear(void) { + for (int i = 0; i < size; i++) + data[i] = T(0); size = 0; } void Sort(__compar_fn_t Compare) |