@@ -219,7 +219,7 @@ internal static ref T ThrowIndexOutOfBounds<T>(int index, int capacity) =>
219219 throw new IndexOutOfRangeException ( $ "Index { index } is out of range for Stack{ capacity } <{ typeof ( T ) } ,..>.") ;
220220}
221221
222- /// <summary>Stack with the Size information to check the Capacity in the compile time</summary>
222+ /// <summary>Stack with the Size information to check it at compile time</summary>
223223public interface IStack < T , TSize , TStack > : IStack < T , TStack >
224224 where TSize : struct , ISize
225225 where TStack : struct , IStack < T , TSize , TStack >
@@ -269,25 +269,25 @@ public interface ISize16Plus : ISize8Plus { }
269269/// <summary>Marker for collection or container holding 4 items</summary>
270270public struct Size2 : ISize2Plus
271271{
272- /// <summary>Returns the size of the collection or container</summary >
272+ /// <inheritdoc/ >
273273 public int Size => 2 ;
274274}
275275/// <summary>Marker for collection or container holding 4 items</summary>
276276public struct Size4 : ISize4Plus
277277{
278- /// <summary>Returns the size of the collection or container</summary >
278+ /// <inheritdoc/ >
279279 public int Size => 4 ;
280280}
281281/// <summary>Marker for collection or container holding 8 items</summary>
282282public struct Size8 : ISize8Plus
283283{
284- /// <summary>Returns the size of the collection or container</summary >
284+ /// <inheritdoc/ >
285285 public int Size => 8 ;
286286}
287287/// <summary>Marker for collection or container holding 16 items</summary>
288288public struct Size16 : ISize16Plus
289289{
290- /// <summary>Returns the size of the collection or container</summary >
290+ /// <inheritdoc/ >
291291 public int Size => 16 ;
292292}
293293
@@ -819,7 +819,7 @@ public int GetHashCode((A, B, C) key) =>
819819 Hasher . Combine ( RuntimeHelpers . GetHashCode ( key . Item1 ) , Hasher . Combine ( RuntimeHelpers . GetHashCode ( key . Item2 ) , RuntimeHelpers . GetHashCode ( key . Item3 ) ) ) ;
820820}
821821
822- /// <summary>Add the Infer parameter to `T Method{T}(..., Use{T} _)` to enable type inference for T,
822+ /// <summary>Add the Use parameter to `T Method{T}(..., Use{T} _)` to enable type inference for T,
823823/// by calling it as `var t = Method(..., default(Use{T}))`</summary>
824824public interface Use < T > { }
825825
@@ -836,7 +836,7 @@ public static class SmallMap
836836 internal const byte ProbeCountShift = 32 - ProbeBits ;
837837 // ~0b11111000000000000000000000000000 -> 0b00000111111111111111111111111111
838838 internal const int HashAndIndexMask = ~ ( NotShiftedProbeCountMask << ProbeCountShift ) ;
839- // Window with the hash mask wothout the lead ProbeMask and closing IndexMask 0b00000111111111111111111111110000
839+ // Window with the hash mask without the lead ProbeMask and closing IndexMask 0b00000111111111111111111111110000
840840 internal const int HashMask = HashAndIndexMask & ~ IndexMask ;
841841
842842 /// <summary>Represent a keyed entry stored in the SmallMap.
@@ -1388,7 +1388,7 @@ public ref TEntry AddOrGetEntryRef(K key, out bool found)
13881388 // to the usual HashMap packed hashes and indexes array for the promised O(1) lookup.
13891389 // But the values are remaining on the Stack, and for the found index of the entry we use the GetSurePresentItemRef(index)
13901390 // to get the value reference either from the Stack or the Entries.
1391- // So the values on the stack are guarntied to be stable from the beginning of the map creation,
1391+ // So the values on the stack are guarantied to be stable from the beginning of the map creation,
13921392 // because they are not copied when the Entries need to Resize (depending on the TEntries implementation).
13931393
13941394 _capacityBitShift = MinHashesCapacityBitShift ;
@@ -1400,7 +1400,7 @@ public ref TEntry AddOrGetEntryRef(K key, out bool found)
14001400 AddJustHashAndEntryIndexWithoutResizing ( default ( TEq ) . GetHashCode ( key ) , StackEntries . Capacity ) ;
14011401
14021402 _count = StackEntries . Capacity + 1 ; // +1 because we added the new key
1403- _entries . Init ( StackEntries . Capacity ) ; // Give the heap entries the same initial capcity as Stack, effectively doubling the capacity
1403+ _entries . Init ( StackEntries . Capacity ) ; // Give the heap entries the same initial capacity as Stack, effectively doubling the capacity
14041404 return ref _entries . AddKeyAndGetEntryRef ( key , 0 ) ; // add the new key to the entries with the 0 index in the entries
14051405 }
14061406
@@ -1480,7 +1480,7 @@ public ref TEntry AddSureAbsentDefaultEntryAndGetRef(K key)
14801480 AddJustHashAndEntryIndexWithoutResizing ( default ( TEq ) . GetHashCode ( key ) , StackEntries . Capacity ) ;
14811481
14821482 _count = StackEntries . Capacity + 1 ; // +1 because we added the new key
1483- _entries . Init ( StackEntries . Capacity ) ; // Give the heap entries the same initial capcity as Stack, effectively doubling the capacity
1483+ _entries . Init ( StackEntries . Capacity ) ; // Give the heap entries the same initial capacity as Stack, effectively doubling the capacity
14841484 return ref _entries . AddKeyAndGetEntryRef ( key , 0 ) ; // add the new key to the entries with the 0 index in the entries
14851485 }
14861486
0 commit comments