private static void EnsureCapacity() { if (count == capacity) { capacity = capacity * 2; chunks = MemoryUtility.ReallocPtrArray(chunks, capacity); } }
public void EnsureCapacity() { if (this.count == this.capacity) { this.capacity = this.capacity * 2; this.chunks = MemoryUtility.ReallocPtrArray(this.chunks, this.capacity); } }
internal static void AppendArchetypesToQueryData(EntityQueryData *queryData, Archetype **archetypes, int count) { var size = count * sizeof(Archetype *); queryData->archetypes = MemoryUtility.ReallocPtrArray <Archetype>(queryData->archetypes, queryData->archetypeCount + count); Buffer.MemoryCopy(archetypes, queryData->archetypes + queryData->archetypeCount, size, size); queryData->archetypeCount += count; }
private void EnsureCapacity(int count) { int requiredCapacity = this.count + count; if (requiredCapacity > this.capacity) { this.capacity = MemoryUtility.RoundToPowerOfTwo(requiredCapacity); this.chunks = MemoryUtility.ReallocPtrArray <Chunk>(this.chunks, this.capacity); } }