From f59c8b45649f594742a871e29549b940c25a253d Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Wed, 21 Jul 2004 12:30:52 +0000 Subject: [PATCH] Bug 251277 add a Clear() function to remove all elements from an nsValueArray r=bsmedberg sr=dougt --- xpcom/ds/nsValueArray.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xpcom/ds/nsValueArray.h b/xpcom/ds/nsValueArray.h index 0abc8da81832..6437ca607de0 100644 --- a/xpcom/ds/nsValueArray.h +++ b/xpcom/ds/nsValueArray.h @@ -83,6 +83,11 @@ class NS_COM nsValueArray { void Compact(); + // Removes all elements from this array + inline void Clear() { + mCount = 0; + } + // // Array access. //