mirror of https://github.com/CGAL/cgal
Make the correct part of Node_ptr const
This commit is contained in:
parent
901c27724b
commit
b6e60ba6dc
|
|
@ -87,6 +87,8 @@ private:
|
||||||
typedef AABB_node<AABB_traits> Node;
|
typedef AABB_node<AABB_traits> Node;
|
||||||
typedef typename AABB_traits::Primitive Primitive;
|
typedef typename AABB_traits::Primitive Primitive;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
/// Helper functions
|
/// Helper functions
|
||||||
const Node& left_child() const
|
const Node& left_child() const
|
||||||
{ return *static_cast<Node*>(m_p_left_child); }
|
{ return *static_cast<Node*>(m_p_left_child); }
|
||||||
|
|
@ -97,8 +99,7 @@ private:
|
||||||
const Primitive& right_data() const
|
const Primitive& right_data() const
|
||||||
{ return *static_cast<Primitive*>(m_p_right_child); }
|
{ return *static_cast<Primitive*>(m_p_right_child); }
|
||||||
|
|
||||||
public:
|
private:
|
||||||
|
|
||||||
Node& left_child() { return *static_cast<Node*>(m_p_left_child); }
|
Node& left_child() { return *static_cast<Node*>(m_p_left_child); }
|
||||||
Node& right_child() { return *static_cast<Node*>(m_p_right_child); }
|
Node& right_child() { return *static_cast<Node*>(m_p_right_child); }
|
||||||
Primitive& left_data() { return *static_cast<Primitive*>(m_p_left_child); }
|
Primitive& left_data() { return *static_cast<Primitive*>(m_p_left_child); }
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,8 @@ private:
|
||||||
|
|
||||||
struct Node_ptr_with_ft {
|
struct Node_ptr_with_ft {
|
||||||
Node_ptr_with_ft(const Node* node, const FT& value, size_type nb_primitives)
|
Node_ptr_with_ft(const Node* node, const FT& value, size_type nb_primitives)
|
||||||
: node(const_cast<Node*>(node)), value(value), nb_primitives(nb_primitives) {}
|
: node(node), value(value), nb_primitives(nb_primitives) {}
|
||||||
Node* node;
|
const Node* node;
|
||||||
FT value;
|
FT value;
|
||||||
size_type nb_primitives;
|
size_type nb_primitives;
|
||||||
bool operator<(const Node_ptr_with_ft& other) const { return value < other.value; }
|
bool operator<(const Node_ptr_with_ft& other) const { return value < other.value; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue