summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-05-20 14:01:02 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-05-20 14:01:02 +0200
commitd2030debc002d416fb32dc5187e79381ffe5422c (patch)
tree7dd877e5c6b5325be7baef20c46487379cc0c5a9
parentcdaf99121bb31fff5e11765ab6ad5f61645134fd (diff)
downloadvdr-d2030debc002d416fb32dc5187e79381ffe5422c.tar.gz
vdr-d2030debc002d416fb32dc5187e79381ffe5422c.tar.bz2
cVector::Clear() now reinitializes any previously used members
-rw-r--r--HISTORY1
-rw-r--r--tools.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index c2f338b5..6dc72e8e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7114,3 +7114,4 @@ Video Disk Recorder Revision History
- Fixed checking for UTF-8 support in cFont::Bidi() (reported by Torsten Lang).
- If a recording has no info file, the 'title' of the recording's info is now set
to the recording's name.
+- cVector::Clear() now reinitializes any previously used members.
diff --git a/tools.h b/tools.h
index 333b81a3..b73448d3 100644
--- a/tools.h
+++ b/tools.h
@@ -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)