From 0f98e9264a8d1c8dda001ac0310e784c912c898a Mon Sep 17 00:00:00 2001 From: sebas77 Date: Fri, 8 Dec 2017 18:19:50 +0000 Subject: [PATCH] new FasterList --- DataStructures/FasterList.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/DataStructures/FasterList.cs b/DataStructures/FasterList.cs index cfd9825..384683c 100644 --- a/DataStructures/FasterList.cs +++ b/DataStructures/FasterList.cs @@ -466,7 +466,10 @@ namespace Svelto.DataStructures readonly FasterList _list; } - public class FasterList : IList + public interface IFasterList + {} + + public class FasterList : IList, IFasterList { const int MIN_SIZE = 4; @@ -807,9 +810,11 @@ namespace Svelto.DataStructures { return fasterList._count; } - - public static T[] ToArrayFast(FasterList fasterList) + + public static T[] ToArrayFast(FasterList fasterList, out int count) { + count = fasterList._count; + return fasterList._buffer; } }