MSVC "assignment within conditional" warning fix

The latest MSVC 2019 issues a warning on this line. This change performs the assignment prior to the conditional.
This commit is contained in:
Conrad Poelman
2020-01-25 16:07:29 -05:00
committed by GitHub
parent d8761780b0
commit b45a3b7cdd

View File

@@ -1014,7 +1014,8 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
while(x){
++depth;
y = x;
x = (left_child = comp(key, x)) ?
left_child = comp(key, x);
x = left_child ?
NodeTraits::get_left(x) : (prev = y, NodeTraits::get_right(x));
}