Skip to content

Commit

Permalink
fixed CSplayTree.size
Browse files Browse the repository at this point in the history
  • Loading branch information
kanwei committed Apr 1, 2009
1 parent 5dd3ee5 commit 90c214a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/containers/splaytree_map/splaytree.c
Expand Up @@ -55,6 +55,7 @@ static splaytree_node* splay(splaytree *tree, splaytree_node *n, VALUE key) {
y = n->left;
n->left = y->right;
y->right = n;
n->size = node_size(n->left) + node_size(n->right) + 1;
n = y;
if (!n->left) break;
}
Expand All @@ -69,6 +70,7 @@ static splaytree_node* splay(splaytree *tree, splaytree_node *n, VALUE key) {
y = n->right;
n->right = y->left;
y->left = n;
n->size = node_size(n->left) + node_size(n->right) + 1;
n = y;
if (!n->right) break;
}
Expand Down

0 comments on commit 90c214a

Please sign in to comment.