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

◆ putEntry()

void System.Collections.Hashtable.putEntry ( bucket[] newBuckets,
object key,
object nvalue,
int hashcode )
inlineprivateinherited

Definition at line 1010 of file Hashtable.cs.

1011 {
1012 uint num = 1 + (uint)(hashcode * 101) % (uint)(newBuckets.Length - 1);
1013 int num2 = (int)((uint)hashcode % (uint)newBuckets.Length);
1014 while (newBuckets[num2].key != null && newBuckets[num2].key != _buckets)
1015 {
1016 if (newBuckets[num2].hash_coll >= 0)
1017 {
1018 newBuckets[num2].hash_coll |= int.MinValue;
1019 _occupancy++;
1020 }
1021 num2 = (int)((num2 + num) % (uint)newBuckets.Length);
1022 }
1023 newBuckets[num2].val = nvalue;
1024 newBuckets[num2].key = key;
1025 newBuckets[num2].hash_coll |= hashcode;
1026 }

References System.Collections.Hashtable._buckets, System.Collections.Hashtable._occupancy, System.Runtime.Serialization.Dictionary, and System.key.

Referenced by System.Collections.Hashtable.rehash().