Mercurial > dedupe
diff RBTree.hpp @ 34:fda70a362ed5
Remove whitespace.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 06 Sep 2012 21:33:24 +0200 |
| parents | bf3dce7fedcb |
| children | f711ddb56ae7 |
line wrap: on
line diff
--- a/RBTree.hpp Thu Sep 06 21:32:33 2012 +0200 +++ b/RBTree.hpp Thu Sep 06 21:33:24 2012 +0200 @@ -59,7 +59,7 @@ else return NULL; } - + RBTreeNode* uncle() { RBTreeNode* g = grandparent(); @@ -128,7 +128,7 @@ RBTreeNode* g = grandparent(); CONSISTENCY_CHECK(this); CONSISTENCY_CHECK(g); - + this->parent->setColor(BLACK); g->setColor(RED); if (this == this->parent->left) @@ -138,7 +138,7 @@ g->rotate_left(); } } - + void insert_case4() { RBTreeNode* g = grandparent(); @@ -167,7 +167,7 @@ RBTreeNode *u = uncle(); CONSISTENCY_CHECK(this); CONSISTENCY_CHECK(u); - + if ((u != NULL) && (u->color() == RED)) { this->parent->setColor(BLACK); u->setColor(BLACK); @@ -217,7 +217,7 @@ right->insert_case1(); } else - right->insert(data); + right->insert(data); } else { throw ValueExistsException(); @@ -260,7 +260,7 @@ return n + (left ? left->total_depth(n + 1) : 0) + (right ? right->total_depth(n + 1) : 0); } - bool consistent() const + bool consistent() const { bool retVal = true; if (left) @@ -283,8 +283,8 @@ { delete node; } - - bool consistent() const + + bool consistent() const { if (node == 0) return true;
