mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:43:04 +01:00
fixed gcc compile
This commit is contained in:
parent
e473bfd10c
commit
6835b7f6ba
@ -551,34 +551,34 @@ public:
|
||||
tree->defaultAccessor.curr = NULL;
|
||||
|
||||
if (!tree->level) {
|
||||
curr->remove(curPos);
|
||||
return curPos < curr->getCount();
|
||||
this->curr->remove(this->curPos);
|
||||
return this->curPos < this->curr->getCount();
|
||||
}
|
||||
if (curr->getCount() == 1)
|
||||
if (this->curr->getCount() == 1)
|
||||
{
|
||||
// Only one node left in the current page. We cannot remove it directly
|
||||
// because is would invalidate our tree structure
|
||||
fb_assert(curPos == 0);
|
||||
fb_assert(this->curPos == 0);
|
||||
ItemList *temp;
|
||||
if ((temp = curr->prev) && NEED_MERGE(temp->getCount(), LeafCount)) {
|
||||
temp = curr->next;
|
||||
tree->_removePage(0, curr);
|
||||
curr = temp;
|
||||
return curr;
|
||||
if ((temp = this->curr->prev) && NEED_MERGE(temp->getCount(), LeafCount)) {
|
||||
temp = this->curr->next;
|
||||
tree->_removePage(0, this->curr);
|
||||
this->curr = temp;
|
||||
return this->curr;
|
||||
}
|
||||
if ((temp = curr->next) && NEED_MERGE(temp->getCount(), LeafCount)) {
|
||||
tree->_removePage(0, curr);
|
||||
curr = temp;
|
||||
if ((temp = this->curr->next) && NEED_MERGE(temp->getCount(), LeafCount)) {
|
||||
tree->_removePage(0, this->curr);
|
||||
this->curr = temp;
|
||||
return true;
|
||||
}
|
||||
if ((temp = curr->prev)) {
|
||||
(*curr)[0] = (*temp)[temp->getCount() - 1];
|
||||
if ((temp = this->curr->prev)) {
|
||||
(*this->curr)[0] = (*temp)[temp->getCount() - 1];
|
||||
temp->shrink(temp->getCount() - 1);
|
||||
curr = curr->next;
|
||||
return curr;
|
||||
this->curr = this->curr->next;
|
||||
return this->curr;
|
||||
}
|
||||
if ((temp = curr->next)) {
|
||||
(*curr)[0] = (*temp)[0];
|
||||
if ((temp = this->curr->next)) {
|
||||
(*this->curr)[0] = (*temp)[0];
|
||||
temp->remove(0);
|
||||
return true;
|
||||
}
|
||||
@ -586,34 +586,34 @@ public:
|
||||
fb_assert(false);
|
||||
return false;
|
||||
}
|
||||
curr->remove(curPos);
|
||||
this->curr->remove(this->curPos);
|
||||
ItemList *temp;
|
||||
if ((temp = curr->prev) && NEED_MERGE(temp->getCount() + curr->getCount(), LeafCount)) {
|
||||
if ((temp = this->curr->prev) && NEED_MERGE(temp->getCount() + this->curr->getCount(), LeafCount)) {
|
||||
// After join upper levels of the tree remain stable because join doesn't change
|
||||
// key of the page. The same applies to lower case too.
|
||||
curPos += temp->getCount();
|
||||
temp->join(*curr);
|
||||
tree->_removePage(0, curr);
|
||||
curr = temp;
|
||||
this->curPos += temp->getCount();
|
||||
temp->join(*this->curr);
|
||||
tree->_removePage(0, this->curr);
|
||||
this->curr = temp;
|
||||
// The code below will adjust current position if needed
|
||||
}
|
||||
else {
|
||||
if ((temp = curr->next) && NEED_MERGE(temp->getCount() + curr->getCount(), LeafCount)) {
|
||||
curr->join(*temp);
|
||||
if ((temp = this->curr->next) && NEED_MERGE(temp->getCount() + this->curr->getCount(), LeafCount)) {
|
||||
this->curr->join(*temp);
|
||||
tree->_removePage(0, temp);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (curPos >= curr->getCount()) {
|
||||
fb_assert(curPos == curr->getCount());
|
||||
curPos = 0;
|
||||
curr = curr->next;
|
||||
return curr;
|
||||
if (this->curPos >= this->curr->getCount()) {
|
||||
fb_assert(this->curPos == this->curr->getCount());
|
||||
this->curPos = 0;
|
||||
this->curr = this->curr->next;
|
||||
return this->curr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Value& current() const { return (*curr)[curPos]; }
|
||||
Value& current() const { return (*this->curr)[this->curPos]; }
|
||||
|
||||
private:
|
||||
BePlusTree* tree;
|
||||
|
Loading…
Reference in New Issue
Block a user