started changing to valuetuple
This commit is contained in:
parent
b5b363ae9f
commit
bf8298658c
1 changed files with 6 additions and 6 deletions
|
|
@ -333,11 +333,11 @@ namespace PersistentMap
|
|||
// Insertion Logic
|
||||
// ---------------------------------------------------------
|
||||
|
||||
private class SplitResult<K>
|
||||
private class SeplitResult<K>
|
||||
{
|
||||
public Node<K> NewNode;
|
||||
public K Separator;
|
||||
public SplitResult(Node<K> newNode, K separator)
|
||||
public SeplitResult(Node<K> newNode, K separator)
|
||||
{
|
||||
NewNode = newNode;
|
||||
Separator = separator;
|
||||
|
|
@ -371,7 +371,7 @@ namespace PersistentMap
|
|||
leaf.SetCount(count + 1);
|
||||
}
|
||||
|
||||
private static SplitResult<K> SplitLeaf<K, V, TStrategy>(LeafNode<K, V> left, int insertIndex, K key, V value, TStrategy strategy, OwnerId owner)
|
||||
private static (Node<K>, K) SplitLeaf<K, V, TStrategy>(LeafNode<K, V> left, int insertIndex, K key, V value, TStrategy strategy, OwnerId owner)
|
||||
where TStrategy : IKeyStrategy<K>
|
||||
{
|
||||
var right = new LeafNode<K, V>(owner, strategy.UsesPrefixes);
|
||||
|
|
@ -403,7 +403,7 @@ namespace PersistentMap
|
|||
InsertIntoLeaf(right, insertIndex - splitPoint, key, value, strategy);
|
||||
}
|
||||
|
||||
return new SplitResult<K>(right, right.Keys[0]);
|
||||
return (right, right.Keys[0]);
|
||||
}
|
||||
|
||||
private static void InsertIntoInternal<K, TStrategy>(InternalNode<K> node, int index, K separator, Node<K> newChild, TStrategy strategy)
|
||||
|
|
@ -437,7 +437,7 @@ namespace PersistentMap
|
|||
node.SetCount(count + 1);
|
||||
}
|
||||
|
||||
private static SplitResult<K> SplitInternal<K, TStrategy>(InternalNode<K> left, int insertIndex, K separator, Node<K> newChild, TStrategy strategy, OwnerId owner)
|
||||
private static (Node<K>, K) SplitInternal<K, TStrategy>(InternalNode<K> left, int insertIndex, K separator, Node<K> newChild, TStrategy strategy, OwnerId owner)
|
||||
where TStrategy : IKeyStrategy<K>
|
||||
{
|
||||
var right = strategy.UsesPrefixes
|
||||
|
|
@ -477,7 +477,7 @@ namespace PersistentMap
|
|||
InsertIntoInternal(right, insertIndex - (splitPoint + 1), separator, newChild, strategy);
|
||||
}
|
||||
|
||||
return new SplitResult<K>(right, upKey);
|
||||
return (right, upKey);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue