From: Mukund Sivaraman Date: Fri, 11 May 2012 06:05:55 +0000 (+0530) Subject: [1803] Use isEmpty() instead of checking the level count X-Git-Tag: trac2351_base~226^2~159^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=906ba788fd5c8fb08f4cf2717e0fbccdca4850ff;p=thirdparty%2Fkea.git [1803] Use isEmpty() instead of checking the level count --- diff --git a/src/lib/datasrc/rbtree.h b/src/lib/datasrc/rbtree.h index 5e07d32651..9803bad18c 100644 --- a/src/lib/datasrc/rbtree.h +++ b/src/lib/datasrc/rbtree.h @@ -1241,7 +1241,7 @@ RBTree::previousNode(RBTreeNodeChain& node_path) const { // So, the node_path now contains the path to a node we want previous for. // We just need to go one step left. - if (node_path.getLevelCount() == 0) { + if (node_path.isEmpty()) { // We got past the first one. So, we're returning NULL from // now on. return (NULL); @@ -1256,7 +1256,7 @@ RBTree::previousNode(RBTreeNodeChain& node_path) const { // up. That one is the smaller one than us. node_path.pop(); - if (node_path.getLevelCount() == 0) { + if (node_path.isEmpty()) { // We're past the first one return (NULL); } else {