Skip to content

Commit

Permalink
return constructed node immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
travissanderson-wf committed Aug 2, 2023
1 parent db0c2d2 commit 9a0cf67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/src/r_tree/r_tree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ class RTree<E> {

if (N <= M) {
// reached leaf level; return leaf
node = LeafNode(_branchFactor, initialItems: items.sublist(left, right + 1));
return node;
return LeafNode(_branchFactor, initialItems: items.sublist(left, right + 1));
}

if (height == 0) {
Expand Down

0 comments on commit 9a0cf67

Please sign in to comment.