Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
        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);
            }
        }