add missing const

This commit is contained in:
Sébastien Loriot 2024-03-28 07:34:58 +01:00
parent 5254404517
commit 5a0044c917
1 changed files with 4 additions and 4 deletions

View File

@ -926,7 +926,7 @@ public:
\return the index of the specified descendant node \return the index of the specified descendant node
*/ */
template <typename... Indices> template <typename... Indices>
Node_index descendant(Node_index node, Indices... indices) { Node_index descendant(Node_index node, Indices... indices) const {
return recursive_descendant(node, indices...); return recursive_descendant(node, indices...);
} }
@ -940,7 +940,7 @@ public:
\return the index of the specified node \return the index of the specified node
*/ */
template <typename... Indices> template <typename... Indices>
Node_index node(Indices... indices) { Node_index node(Indices... indices) const {
return descendant(root(), indices...); return descendant(root(), indices...);
} }
@ -1261,10 +1261,10 @@ public:
private: // functions : private: // functions :
Node_index recursive_descendant(Node_index node, std::size_t i) { return child(node, i); } Node_index recursive_descendant(Node_index node, std::size_t i) const { return child(node, i); }
template <typename... Indices> template <typename... Indices>
Node_index recursive_descendant(Node_index node, std::size_t i, Indices... remaining_indices) { Node_index recursive_descendant(Node_index node, std::size_t i, Indices... remaining_indices) const {
return recursive_descendant(child(node, i), remaining_indices...); return recursive_descendant(child(node, i), remaining_indices...);
} }