From 5cde13f21d36c7224b0e13d11c4b49379ae5210d Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 6 Oct 2016 10:38:45 +0900 Subject: Imported Upstream version 1.61.0 Change-Id: I96a1f878d1e6164f01e9aadd5147f38fca448d90 Signed-off-by: DongHun Kwak --- boost/intrusive/detail/avltree_node.hpp | 53 +++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'boost/intrusive/detail/avltree_node.hpp') diff --git a/boost/intrusive/detail/avltree_node.hpp b/boost/intrusive/detail/avltree_node.hpp index 22b8fd1219..16d1c1d291 100644 --- a/boost/intrusive/detail/avltree_node.hpp +++ b/boost/intrusive/detail/avltree_node.hpp @@ -22,6 +22,7 @@ #endif #include +#include #include #include #include @@ -68,49 +69,49 @@ struct default_avltree_node_traits_impl typedef typename node::balance balance; - static node_ptr get_parent(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n) { return n->parent_; } - static node_ptr get_parent(const node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n) { return n->parent_; } - static void set_parent(const node_ptr & n, const node_ptr & p) + BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p) { n->parent_ = p; } - static node_ptr get_left(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n) { return n->left_; } - static node_ptr get_left(const node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n) { return n->left_; } - static void set_left(const node_ptr & n, const node_ptr & l) + BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l) { n->left_ = l; } - static node_ptr get_right(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n) { return n->right_; } - static node_ptr get_right(const node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n) { return n->right_; } - static void set_right(const node_ptr & n, const node_ptr & r) + BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r) { n->right_ = r; } - static balance get_balance(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n) { return n->balance_; } - static balance get_balance(const node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const node_ptr & n) { return n->balance_; } - static void set_balance(const node_ptr & n, balance b) + BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b) { n->balance_ = b; } - static balance negative() + BOOST_INTRUSIVE_FORCEINLINE static balance negative() { return node::negative_t; } - static balance zero() + BOOST_INTRUSIVE_FORCEINLINE static balance zero() { return node::zero_t; } - static balance positive() + BOOST_INTRUSIVE_FORCEINLINE static balance positive() { return node::positive_t; } }; @@ -126,37 +127,37 @@ struct compact_avltree_node_traits_impl typedef pointer_plus_bits ptr_bit; - static node_ptr get_parent(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n) { return ptr_bit::get_pointer(n->parent_); } - static void set_parent(const node_ptr & n, const node_ptr & p) + BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p) { ptr_bit::set_pointer(n->parent_, p); } - static node_ptr get_left(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n) { return n->left_; } - static void set_left(const node_ptr & n, const node_ptr & l) + BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l) { n->left_ = l; } - static node_ptr get_right(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n) { return n->right_; } - static void set_right(const node_ptr & n, const node_ptr & r) + BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r) { n->right_ = r; } - static balance get_balance(const const_node_ptr & n) + BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n) { return (balance)ptr_bit::get_bits(n->parent_); } - static void set_balance(const node_ptr & n, balance b) + BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b) { ptr_bit::set_bits(n->parent_, (std::size_t)b); } - static balance negative() + BOOST_INTRUSIVE_FORCEINLINE static balance negative() { return node::negative_t; } - static balance zero() + BOOST_INTRUSIVE_FORCEINLINE static balance zero() { return node::zero_t; } - static balance positive() + BOOST_INTRUSIVE_FORCEINLINE static balance positive() { return node::positive_t; } }; -- cgit v1.2.3