Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }