forked from boostorg/intrusive
C++03 and (C)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// (C) Copyright Ion Gaztanaga 2007-2014
|
// (C) Copyright Ion Gaztanaga 2007-2014
|
||||||
|
// (C) Copyright Daniel Steck 2021
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@@ -413,7 +414,8 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
|||||||
|
|
||||||
//Finally adjust parent nodes
|
//Finally adjust parent nodes
|
||||||
if ((temp = NodeTraits::get_parent(node1)) == NodeTraits::get_parent(node2)) {
|
if ((temp = NodeTraits::get_parent(node1)) == NodeTraits::get_parent(node2)) {
|
||||||
auto left = NodeTraits::get_left(temp);
|
// special logic for the case where the nodes are siblings
|
||||||
|
const node_ptr left = NodeTraits::get_left(temp);
|
||||||
NodeTraits::set_left(temp, NodeTraits::get_right(temp));
|
NodeTraits::set_left(temp, NodeTraits::get_right(temp));
|
||||||
NodeTraits::set_right(temp, left);
|
NodeTraits::set_right(temp, left);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,6 +1,14 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Created by daniel on 27/04/2021.
|
// (C) Copyright Daniel Steck 2021
|
||||||
//
|
//
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
//
|
||||||
|
// See http://www.boost.org/libs/intrusive for documentation.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#include <boost/intrusive/rbtree.hpp>
|
#include <boost/intrusive/rbtree.hpp>
|
||||||
#include <boost/next_prior.hpp>
|
#include <boost/next_prior.hpp>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user