IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 05ce8856 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

VolumeTreeNode::walk() made const

parent a06216b6
No related branches found
No related tags found
No related merge requests found
......@@ -54,11 +54,11 @@ namespace corsika {
template <typename IModelProperties>
template <typename TCallable, bool preorder>
inline void VolumeTreeNode<IModelProperties>::walk(TCallable func) {
inline void VolumeTreeNode<IModelProperties>::walk(TCallable func) const {
if constexpr (preorder) { func(*this); }
std::for_each(childNodes_.begin(), childNodes_.end(),
[&](auto& v) { v->walk(func); });
[&](auto const& v) { v->walk(func); });
if constexpr (!preorder) { func(*this); };
}
......
......@@ -44,7 +44,7 @@ namespace corsika {
* func is ignored.
*/
template <typename TCallable, bool preorder = true>
void walk(TCallable func);
void walk(TCallable func) const;
void addChild(VTNUPtr pChild);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment