From 8ace8f1d096c7bf58df914c5c7b395a98e8d3511 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Fri, 7 Oct 2022 17:14:14 +0200 Subject: [PATCH] [component] Pass const l-value references to parallelFor Some functors were given to the lambda as r-value references --- dumux/material/components/tabulatedcomponent.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dumux/material/components/tabulatedcomponent.hh b/dumux/material/components/tabulatedcomponent.hh index 742ef7a669..4cf8fb8755 100644 --- a/dumux/material/components/tabulatedcomponent.hh +++ b/dumux/material/components/tabulatedcomponent.hh @@ -818,7 +818,7 @@ private: * \param values container to store property values */ template<class PropFunc, class MinPFunc, class MaxPFunc> - static void initTPArray_(PropFunc&& f, MinPFunc&& minP, MaxPFunc&& maxP, std::vector<typename RawComponent::Scalar>& values) + static void initTPArray_(const PropFunc& f, const MinPFunc& minP, const MaxPFunc& maxP, std::vector<typename RawComponent::Scalar>& values) { Dumux::parallelFor(nTemp_, [&](std::size_t iT) { @@ -850,9 +850,9 @@ private: * \param rhoMax container to store maximum density values */ template<class RhoFunc, class MinPFunc, class MaxPFunc> - static void initMinMaxRhoArray_(RhoFunc&& rho, - MinPFunc&& minP, - MaxPFunc&& maxP, + static void initMinMaxRhoArray_(const RhoFunc& rho, + const MinPFunc& minP, + const MaxPFunc& maxP, std::vector<typename RawComponent::Scalar>& rhoMin, std::vector<typename RawComponent::Scalar>& rhoMax) { @@ -879,7 +879,8 @@ private: * \param rhoMax container with maximum density values */ template<class PFunc> - static void initPressureArray_(std::vector<typename RawComponent::Scalar>& pressure, PFunc&& p, + static void initPressureArray_(std::vector<typename RawComponent::Scalar>& pressure, + const PFunc& p, const std::vector<typename RawComponent::Scalar>& rhoMin, const std::vector<typename RawComponent::Scalar>& rhoMax) { -- GitLab