forked from boostorg/intrusive
GitHub #12: Fix MSVC14 warning C4456: declaration of 'x_parent_right' hides previous local declaration
This commit is contained in:
@@ -3761,6 +3761,13 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
||||
|
||||
[section:release_notes Release Notes]
|
||||
|
||||
[section:release_notes_boost_1_57_00 Boost 1.57 Release]
|
||||
|
||||
* Fixed bugs:
|
||||
* [@https://github.com/boostorg/intrusive/pull/12 GitHub #12: ['Fix MSVC14 warning C4456: declaration of 'x_parent_right' hides previous local declaration]]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:release_notes_boost_1_56_00 Boost 1.56 Release]
|
||||
|
||||
* Improved Doxygen generated reference and updated and fixed forward-declaration header.
|
||||
|
@@ -411,7 +411,9 @@ class avltree_algorithms
|
||||
|
||||
static void rebalance_after_erasure(const node_ptr & header, node_ptr x, node_ptr x_parent)
|
||||
{
|
||||
for (node_ptr root = NodeTraits::get_parent(header); x != root; root = NodeTraits::get_parent(header)) {
|
||||
for ( node_ptr root = NodeTraits::get_parent(header)
|
||||
; x != root
|
||||
; root = NodeTraits::get_parent(header), x_parent = NodeTraits::get_parent(x)) {
|
||||
const balance x_parent_balance = NodeTraits::get_balance(x_parent);
|
||||
//Don't cache x_is_leftchild or similar because x can be null and
|
||||
//equal to both x_parent_left and x_parent_right
|
||||
@@ -453,7 +455,6 @@ class avltree_algorithms
|
||||
}
|
||||
else {
|
||||
// x is left child (x_parent_right is the right child)
|
||||
const node_ptr x_parent_right(NodeTraits::get_right(x_parent));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(x_parent_right);
|
||||
if (NodeTraits::get_balance(x_parent_right) == NodeTraits::negative()) {
|
||||
// x_parent_right MUST have then a left child
|
||||
@@ -473,7 +474,6 @@ class avltree_algorithms
|
||||
else{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
|
||||
}
|
||||
x_parent = NodeTraits::get_parent(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user