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

◆ rehash() [2/2]

void System.Collections.Hashtable.rehash ( int newsize)
inlineprivateinherited

Definition at line 879 of file Hashtable.cs.

880 {
881 _occupancy = 0;
882 bucket[] array = new bucket[newsize];
883 for (int i = 0; i < _buckets.Length; i++)
884 {
885 bucket bucket = _buckets[i];
886 if (bucket.key != null && bucket.key != _buckets)
887 {
888 int hashcode = bucket.hash_coll & 0x7FFFFFFF;
889 putEntry(array, bucket.key, bucket.val, hashcode);
890 }
891 }
892 _isWriterInProgress = true;
893 _buckets = array;
894 _loadsize = (int)(_loadFactor * (float)newsize);
896 _isWriterInProgress = false;
897 }
volatile bool _isWriterInProgress
Definition Hashtable.cs:407
void putEntry(bucket[] newBuckets, object key, object nvalue, int hashcode)

References System.Collections.Hashtable._buckets, System.Collections.Hashtable._isWriterInProgress, System.Collections.Hashtable._loadFactor, System.Collections.Hashtable._loadsize, System.Collections.Hashtable._occupancy, System.array, System.Runtime.Serialization.Dictionary, System.Collections.Hashtable.bucket.key, System.Collections.Hashtable.putEntry(), System.Collections.Hashtable.UpdateVersion(), and System.Collections.Hashtable.bucket.val.