Skip to content

Commit

Permalink
fix a bug of removing all
Browse files Browse the repository at this point in the history
  • Loading branch information
masajiro committed May 9, 2023
1 parent e1a0cb7 commit a91abde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.10
2.0.11
9 changes: 4 additions & 5 deletions lib/NGT/Tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,14 @@ void
DVPTree::removeEmptyNodes(InternalNode &inode) {

int csize = internalChildrenSize;


InternalNode *target = &inode;

for(;;) {
#if defined(NGT_SHARED_MEMORY_ALLOCATOR)
Node::ID *children = target->getChildren(internalNodes.allocator);
Node::ID *children = target->getChildren(internalNodes.allocator);
#else
Node::ID *children = target->getChildren();
Node::ID *children = target->getChildren();
#endif
for(;;) {
for (int i = 0; i < csize; i++) {
if (children[i].getType() == Node::ID::Internal) {
return;
Expand Down

0 comments on commit a91abde

Please sign in to comment.