diff --git a/Core/ComponentBuilder.cs b/Core/ComponentBuilder.cs index 5311994..f9a7c8a 100644 --- a/Core/ComponentBuilder.cs +++ b/Core/ComponentBuilder.cs @@ -105,7 +105,7 @@ namespace Svelto.ECS public override int GetHashCode() { return _initializer.GetHashCode(); } - static void Preallocate(ITypeSafeDictionary dictionary, uint size) { dictionary.SetCapacity(size); } + static void Preallocate(ITypeSafeDictionary dictionary, uint size) { dictionary.ResizeTo(size); } readonly T _initializer; diff --git a/Core/EntityReference/EnginesRoot.LocatorMap.cs b/Core/EntityReference/EnginesRoot.LocatorMap.cs index a3cdb8c..147d53c 100644 --- a/Core/EntityReference/EnginesRoot.LocatorMap.cs +++ b/Core/EntityReference/EnginesRoot.LocatorMap.cs @@ -188,7 +188,7 @@ namespace Svelto.ECS { _egidToReferenceMap .GetOrCreate(groupID, () => new SharedSveltoDictionaryNative(size)) - .SetCapacity(size); + .ResizeTo(size); _entityReferenceMap.Resize(size); } diff --git a/DataStructures/ITypeSafeDictionary.cs b/DataStructures/ITypeSafeDictionary.cs index 4cebac4..e43d159 100644 --- a/DataStructures/ITypeSafeDictionary.cs +++ b/DataStructures/ITypeSafeDictionary.cs @@ -33,7 +33,7 @@ namespace Svelto.ECS.Internal void AddEntityToDictionary(EGID fromEntityGid, EGID toEntityID, ITypeSafeDictionary toGroup); void RemoveEntityFromDictionary(EGID fromEntityGid); - void SetCapacity(uint size); + void ResizeTo(uint size); void Trim(); void Clear(); void FastClear(); diff --git a/DataStructures/TypeSafeDictionary.cs b/DataStructures/TypeSafeDictionary.cs index 7415cc3..313178b 100644 --- a/DataStructures/TypeSafeDictionary.cs +++ b/DataStructures/TypeSafeDictionary.cs @@ -364,15 +364,15 @@ namespace Svelto.ECS.Internal } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetCapacity(uint size) + public void ResizeTo(uint size) { if (isUnmanaged) { - implUnmgd.ExpandTo(size); + implUnmgd.ResizeTo(size); } else { - implMgd.ExpandTo(size); + implMgd.ResizeTo(size); } } diff --git a/Svelto.ECS.csproj b/Svelto.ECS.csproj index 4dbdf2c..0644b97 100644 --- a/Svelto.ECS.csproj +++ b/Svelto.ECS.csproj @@ -20,9 +20,9 @@ true - - - - + + + + \ No newline at end of file diff --git a/Svelto.ECS.nuspec b/Svelto.ECS.nuspec index 86b5ed7..24006c2 100644 --- a/Svelto.ECS.nuspec +++ b/Svelto.ECS.nuspec @@ -2,7 +2,7 @@ Svelto.ECS - sebas77 + Sebastiano Mandala $version$ C# Lightweight Data Oriented Entity Component System Framework https://github.com/sebas77/Svelto.ECS diff --git a/package.json b/package.json index 6cf1dec..b5abd7c 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "svelto" ], "name": "com.sebaslab.svelto.ecs", - "version": "3.2.0", + "version": "3.2.1", "type": "library", "unity": "2019.3" } \ No newline at end of file