diff --git a/PersistentMap/BTreeFunctions.cs b/PersistentMap/BTreeFunctions.cs index 4a7a41e..4596c0a 100644 --- a/PersistentMap/BTreeFunctions.cs +++ b/PersistentMap/BTreeFunctions.cs @@ -333,11 +333,11 @@ namespace PersistentMap // Insertion Logic // --------------------------------------------------------- - private class SplitResult + private class SeplitResult { public Node NewNode; public K Separator; - public SplitResult(Node newNode, K separator) + public SeplitResult(Node newNode, K separator) { NewNode = newNode; Separator = separator; @@ -371,7 +371,7 @@ namespace PersistentMap leaf.SetCount(count + 1); } - private static SplitResult SplitLeaf(LeafNode left, int insertIndex, K key, V value, TStrategy strategy, OwnerId owner) + private static (Node, K) SplitLeaf(LeafNode left, int insertIndex, K key, V value, TStrategy strategy, OwnerId owner) where TStrategy : IKeyStrategy { var right = new LeafNode(owner, strategy.UsesPrefixes); @@ -403,7 +403,7 @@ namespace PersistentMap InsertIntoLeaf(right, insertIndex - splitPoint, key, value, strategy); } - return new SplitResult(right, right.Keys[0]); + return (right, right.Keys[0]); } private static void InsertIntoInternal(InternalNode node, int index, K separator, Node newChild, TStrategy strategy) @@ -437,7 +437,7 @@ namespace PersistentMap node.SetCount(count + 1); } - private static SplitResult SplitInternal(InternalNode left, int insertIndex, K separator, Node newChild, TStrategy strategy, OwnerId owner) + private static (Node, K) SplitInternal(InternalNode left, int insertIndex, K separator, Node newChild, TStrategy strategy, OwnerId owner) where TStrategy : IKeyStrategy { var right = strategy.UsesPrefixes @@ -477,7 +477,7 @@ namespace PersistentMap InsertIntoInternal(right, insertIndex - (splitPoint + 1), separator, newChild, strategy); } - return new SplitResult(right, upKey); + return (right, upKey); } // ---------------------------------------------------------