return data by ref

This commit is contained in:
Sébastien Loriot 2024-02-13 17:50:38 +01:00
parent 83d0f632e7
commit 446d39664f
1 changed files with 2 additions and 2 deletions

View File

@ -748,7 +748,7 @@ public:
\brief retrieves a reference to the `Node_data` associated with the node specified by `n` if
`GeomTraits` is a model of `OrthtreeTraitswithData`, and `nullptr` otherwise.
*/
auto data(Node_index n){
std::conditional_t<has_data,Node_data&,void*>& data(Node_index n){
return m_node_contents[n];
}
@ -756,7 +756,7 @@ public:
\brief retrieves a const reference to the `Node_data` associated with the node specified by `n` if
`GeomTraits` is a model of `OrthtreeTraitswithData`, and `nullptr` otherwise.
*/
auto data(Node_index n) const{
std::conditional_t<has_data,const Node_data&,void*> data(Node_index n) const{
return m_node_contents[n];
}