Commit ae25a3ba authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2092] Add comment about pointer dereference asked by reviewer

parent 8cbfc95d
......@@ -1544,6 +1544,8 @@ RBTree<T>::insertRebalance(typename RBNode<T>::RBNodePtr* root,
RBNode<T>* parent;
while (node != (*root).get() &&
(parent = node->getParent())->getColor() == RBNode<T>::RED) {
// Here, node->parent_ is not NULL and it is also red, so
// node->parent_->parent_ is also not NULL.
if (parent == parent->getParent()->getLeft()) {
uncle = parent->getParent()->getRight();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment