Commit e942adac authored by Simon Praetorius's avatar Simon Praetorius

Merge branch 'issue/remove_warning_unused_variable' into 'master'

Remove warning: variable 'childTreePath' set but not used

See merge request !87
parents 8e97e029 aafbf6b1
Pipeline #33373 passed with stage
in 2 minutes and 21 seconds
......@@ -118,7 +118,6 @@ namespace Dune {
auto indices = Dune::range(degree);
Hybrid::forEach(indices, [&](auto i) {
auto childTreePath = Dune::TypeTree::push_back(treePath, i);
auto&& child = tree.child(i);
using Child = std::decay_t<decltype(child)>;
......@@ -129,8 +128,10 @@ namespace Dune {
if (i>0)
visitor.in(tree, treePath);
static const auto visitChild = Visitor::template VisitChild<Tree,Child,TreePath>::value;
if constexpr (visitChild)
if constexpr (visitChild) {
auto childTreePath = Dune::TypeTree::push_back(treePath, i);
applyToTree(child, childTreePath, visitor);
}
visitor.afterChild(tree, child, treePath, i);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment