fCraft.BlockDB.EnsureCapacity C# (CSharp) Method

EnsureCapacity() private method

private EnsureCapacity ( int min ) : void
min int
return void
        private void EnsureCapacity( int min )
        {
            if ( cacheStore.Length < min ) {
                int num = cacheStore.Length;
                while ( num < min ) {
                    if ( num <= CacheLinearResizeThreshold ) {
                        num *= 2;
                    } else {
                        num += CacheLinearResizeThreshold;
                    }
                }
                CacheCapacity = num;
            }
        }