diff --git a/benchmark/binary_trees.cc b/benchmark/binary_trees.cc index 507079745..4c895b2e9 100644 --- a/benchmark/binary_trees.cc +++ b/benchmark/binary_trees.cc @@ -34,9 +34,11 @@ struct Node { Node(Node *l2, int i2, Node *r2) : l(l2), r(r2), i(i2) {} ~Node() { delete l; delete r; } int check() const { - if (l) - return l->check() + i - r->check(); - else return i; + if (l) { + return l->check() + i - r->check(); + } else { + return i; + } } };