You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by jp...@locus.apache.org on 2000/07/31 21:18:26 UTC
cvs commit: xml-xerces/c/src/util RefVectorOf.c
jpolast 00/07/31 12:18:26
Modified: c/src/util RefVectorOf.c
Log:
bug fix in removeAll() to zero out all the pointers.
Revision Changes Path
1.4 +10 -7 xml-xerces/c/src/util/RefVectorOf.c
Index: RefVectorOf.c
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/RefVectorOf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RefVectorOf.c 2000/03/02 19:54:45 1.3
+++ RefVectorOf.c 2000/07/31 19:18:25 1.4
@@ -56,6 +56,9 @@
/**
* $Log: RefVectorOf.c,v $
+ * Revision 1.4 2000/07/31 19:18:25 jpolast
+ * bug fix in removeAll() to zero out all the pointers.
+ *
* Revision 1.3 2000/03/02 19:54:45 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -186,15 +189,13 @@
template <class TElem> void RefVectorOf<TElem>::removeAllElements()
{
- if (fAdoptedElems)
+ for (unsigned int index = 0; index < fCurCount; index++)
{
- for (unsigned int index = 0; index < fCurCount; index++)
- {
- delete fElemList[index];
+ if (fAdoptedElems)
+ delete fElemList[index];
- // Keep unused elements zero for sanity's sake
- fElemList[index] = 0;
- }
+ // Keep unused elements zero for sanity's sake
+ fElemList[index] = 0;
}
fCurCount = 0;
}