From eea340b7efe970e0871181432180debe1b42aa90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@dune-project.org> Date: Wed, 24 Aug 2016 23:02:06 +0200 Subject: [PATCH] [cleanup] Use concept check result directly Since Dune::models() does now directly return an std::integral_constant<bool,*> we can directly use its result in ifElse(). --- dune/solvers/common/resize.hh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dune/solvers/common/resize.hh b/dune/solvers/common/resize.hh index 71748c7e..292d52b0 100644 --- a/dune/solvers/common/resize.hh +++ b/dune/solvers/common/resize.hh @@ -54,9 +54,7 @@ void resizeInitialize(TargetVector& x, const Vector& y, const Value& value) namespace H = Dune::Hybrid; auto size = H::size(y); -// H::ifElse(models<Concept::HasResize, TargetVector>(), [&](auto&& id) { - auto hasResize = std::integral_constant<bool, models<Concept::HasResize, TargetVector>()>(); - H::ifElse(hasResize, [&](auto&& id) { + H::ifElse(models<Concept::HasResize, TargetVector>(), [&](auto&& id) { id(x).resize(size); }, [&](auto&& id) { if (H::size(x) != size) -- GitLab