public void EnsureCapacity(int count) { int requiredCapacity = this.count + count; if (requiredCapacity > this.capacity) { this.capacity = MemoryUtility.RoundToPowerOfTwo(requiredCapacity); this.entitiesInChunk = MemoryUtility.Realloc <EntityInChunk>(this.entitiesInChunk, this.capacity); } }
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); } }
public void EnsureCapacity(int count) { int requiredCapacity = this.count + count; if (requiredCapacity > this.capacity) { this.capacity = MemoryUtility.RoundToPowerOfTwo(requiredCapacity); this.slots = MemoryUtility.Realloc <int>(this.slots, this.capacity); } }