]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1803] Use isEmpty() instead of checking the level count
authorMukund Sivaraman <muks@isc.org>
Fri, 11 May 2012 06:05:55 +0000 (11:35 +0530)
committerMukund Sivaraman <muks@isc.org>
Fri, 11 May 2012 06:05:55 +0000 (11:35 +0530)
src/lib/datasrc/rbtree.h

index 5e07d3265138823e5fd04fce4d5c42149a343b85..9803bad18cf6fd09235a6c1595b46439ff3d0b15 100644 (file)
@@ -1241,7 +1241,7 @@ RBTree<T>::previousNode(RBTreeNodeChain<T>& 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<T>::previousNode(RBTreeNodeChain<T>& 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 {