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

◆ Initialize()

int System.Collections.Generic.HashSet< T >.Initialize ( int capacity)
inlineprivate

Definition at line 880 of file HashSet.cs.

881 {
882 int prime = HashHelpers.GetPrime(capacity);
883 int[] buckets = new int[prime];
884 Entry[] entries = new Entry[prime];
885 _freeList = -1;
886 _buckets = buckets;
888 _fastModMultiplier = HashHelpers.GetFastModMultiplier((uint)prime);
889 return prime;
890 }

References System.Collections.Generic.HashSet< T >._buckets, System.Collections.Generic.HashSet< T >._entries, System.Collections.Generic.HashSet< T >._fastModMultiplier, System.Collections.Generic.HashSet< T >._freeList, System.capacity, System.Runtime.Serialization.Dictionary, System.Collections.HashHelpers.GetFastModMultiplier(), and System.Collections.HashHelpers.GetPrime().

Referenced by System.Collections.Generic.HashSet< T >.HashSet(), System.Collections.Generic.HashSet< T >.HashSet(), System.Collections.Generic.HashSet< T >.AddIfNotPresent(), System.Collections.Generic.HashSet< T >.ConstructFrom(), System.Collections.Generic.HashSet< T >.EnsureCapacity(), and System.Collections.Generic.HashSet< T >.TrimExcess().