Lines Matching refs:top
54 static LocHeapNode* pop(LocHeapNode*& top);
59 static LocHeapNode* remove(LocHeapNode*& top, LocRankable& data);
134 LocHeapNode* LocHeapNode::pop(LocHeapNode*& top) { in pop() argument
141 LocHeapNode* poppedNode = top; in pop()
143 top->mSize--; in pop()
144 if (top->mLeft || top->mRight) { in pop()
148 LocHeapNode*& subTop = (NULL == top->mLeft) ? top->mRight : in pop()
149 ((NULL == top->mRight) ? top->mLeft : in pop()
150 (top->mLeft->outRanks(*(top->mRight)) ? top->mLeft : top->mRight)); in pop()
152 top->swap(*subTop); in pop()
160 top = NULL; in pop()
170 LocHeapNode* LocHeapNode::remove(LocHeapNode*& top, LocRankable& data) { in remove() argument
173 if (&data == (LocRankable*)(top->mData)) { in remove()
175 removedNode = pop(top); in remove()
176 } else if (!data.outRanks(*top->mData)) { in remove()
178 if (top->mLeft) { in remove()
179 removedNode = remove(top->mLeft, data); in remove()
182 if (!removedNode && top->mRight) { in remove()
183 removedNode = remove(top->mRight, data); in remove()
188 top->mSize--; in remove()
238 LocRankable* top = NULL; in peek() local
240 top = mTree->mData; in peek()
242 return top; in peek()