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

◆ Grow()

void System.Collections.Generic.Deque< T >.Grow ( )
inlineprivate

Definition at line 74 of file Deque.cs.

75 {
76 int num = (int)((long)_array.Length * 2L);
77 if (num < _array.Length + 4)
78 {
79 num = _array.Length + 4;
80 }
81 T[] array = new T[num];
82 if (_head == 0)
83 {
84 Array.Copy(_array, array, _size);
85 }
86 else
87 {
88 Array.Copy(_array, _head, array, 0, _array.Length - _head);
89 Array.Copy(_array, 0, array, _array.Length - _head, _tail);
90 }
91 _array = array;
92 _head = 0;
93 _tail = _size;
94 }

References System.Collections.Generic.Deque< T >._array, System.Collections.Generic.Deque< T >._head, System.Collections.Generic.Deque< T >._size, System.Collections.Generic.Deque< T >._tail, System.array, System.Array.Copy(), and System.L.

Referenced by System.Collections.Generic.Deque< T >.EnqueueTail().