Skip to content

Commit 91ba492

Browse files
Added DFS deferred and out parameters to non-deferred. Consider adding more deferred methods.
1 parent c753ecf commit 91ba492

4 files changed

Lines changed: 130 additions & 68 deletions

File tree

Comparers/TreeNodeReferenceEqualityComparer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Diagnostics.CodeAnalysis;
2+
using System.Runtime.CompilerServices;
23

34
using CRTPNodesLibrary.TreeNodes;
45

@@ -20,6 +21,6 @@ public bool Equals(TNode? x, TNode? y)
2021

2122
public int GetHashCode([DisallowNull] TNode obj)
2223
{
23-
return obj.Children.GetHashCode();
24+
return RuntimeHelpers.GetHashCode(obj.Children);
2425
}
2526
}

0 commit comments

Comments
 (0)