From 73e260c1d5792cf9a993893b21500d92ccda882f Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 17 Aug 2020 05:42:01 -0700 Subject: [PATCH] Added Count setter --- BeefLibs/corlib/src/Collections/List.bf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/BeefLibs/corlib/src/Collections/List.bf b/BeefLibs/corlib/src/Collections/List.bf index 3ec1f031..5cb15086 100644 --- a/BeefLibs/corlib/src/Collections/List.bf +++ b/BeefLibs/corlib/src/Collections/List.bf @@ -152,6 +152,19 @@ namespace System.Collections { return mSize; } + + set + { + if (value <= mSize) + { + mSize = (.)value; + } + else + { + int addSize = value - mSize; + Internal.MemSet(GrowUnitialized(addSize), 0, addSize * strideof(T)); + } + } } public bool IsEmpty