Skip to content

Commit d1c6c19

Browse files
committed
cleanup
1 parent 3f9a130 commit d1c6c19

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/FastExpressionCompiler/ImTools.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,10 @@ public static ref T GetSurePresentItemRef<T>(this ref T source, int index) where
165165

166166
/// <summary>Get the item without bounds check</summary>
167167
[MethodImpl((MethodImplOptions)256)]
168-
internal static T GetSurePresentItem<T>(
169168
#if NET7_0_OR_GREATER
170-
this ref T source, int index) where T : struct => Unsafe.Add(ref source, index);
169+
internal static T GetSurePresentItem<T>(this ref T source, int index) where T : struct => Unsafe.Add(ref source, index);
171170
#else
172-
this T[] source, int index) => source[index];
171+
internal static T GetSurePresentItem<T>(this T[] source, int index) => source[index];
173172
#endif
174173

175174
// todo: @perf add the not null variant
@@ -261,10 +260,8 @@ public interface IStack<T, TStack>
261260
/// <summary>Creates a span over the stack items</summary>
262261
public Span<T> AsSpan();
263262
#endif
264-
265263
}
266264

267-
// todo: @wip
268265
/// <summary>Base marker for collection or container holding some number of items</summary>
269266
public interface ISize
270267
{
@@ -1301,11 +1298,6 @@ Probe 1A 2B
13011298
Index: 0 1 2 3 4 5 6 7
13021299
Hash: [7] [0] [0] [0] [0] [13] [5] [21]
13031300
Probe: 2C 1A 2B 3D
1304-
// todo: @perf @wip just an idea
1305-
5 (with padding):
1306-
Index: 0 1 2 3 4 5 6 7 | 8 9 10 11
1307-
Hash: [7] [0] [0] [0] [0] [13] [5] [21]| [7] [0] [0] [0]
1308-
Probe: 2C 1A 2B 3D | 2C
13091301
*/
13101302
[UnscopedRef]
13111303
private ref TEntry AddSureAbsentDefaultAndGetRefInEntries(K key)
@@ -1442,7 +1434,7 @@ internal ref TEntry TryGetRefInEntries(K key, out bool found)
14421434
return ref RefTools<TEntry>.GetNullRef();
14431435
}
14441436

1445-
// todo: @wip
1437+
// todo: @wip @remove
14461438
[UnscopedRef]
14471439
[MethodImpl((MethodImplOptions)256)]
14481440
internal ref TEntry TryGetRefInEntries2(K key, out bool found)

0 commit comments

Comments
 (0)