Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Grow()

void System.Collections.Generic.Stack< T >.Grow ( int capacity)
inlineprivate

Definition at line 333 of file Stack.cs.

334 {
335 int num = ((_array.Length == 0) ? 4 : (2 * _array.Length));
336 if ((uint)num > Array.MaxLength)
337 {
338 num = Array.MaxLength;
339 }
340 if (num < capacity)
341 {
342 num = capacity;
343 }
344 Array.Resize(ref _array, num);
345 }

References System.Collections.Generic.Stack< T >._array, System.capacity, and System.Array.MaxLength.

Referenced by System.Collections.Generic.Stack< T >.EnsureCapacity(), and System.Collections.Generic.Stack< T >.PushWithResize().