From b56ddc31ab04e3427880de40a302368196cc6908 Mon Sep 17 00:00:00 2001 From: micheltakken Date: Wed, 18 Sep 2024 09:21:59 +0200 Subject: [PATCH] Fix issue --- src/hybridDynamics/Scheme.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hybridDynamics/Scheme.hh b/src/hybridDynamics/Scheme.hh index 9f34417..c2718c1 100644 --- a/src/hybridDynamics/Scheme.hh +++ b/src/hybridDynamics/Scheme.hh @@ -40,8 +40,8 @@ Scheme::Scheme(const std::shared_ptr> module_, std::unordered template void Scheme::setAlpha(T alpha_) { - for (auto a : alpha) { - a = alpha_; + for (auto& a : alpha) { + a = static_cast(alpha_); } } @@ -57,8 +57,8 @@ void Scheme::setAlpha(std::unordered_map alpha_) { template void Scheme::setBeta(T beta_) { - for (auto b : beta) { - b = beta_; + for (auto& b : beta) { + b = static_cast(beta_); } } @@ -74,8 +74,8 @@ void Scheme::setBeta(std::unordered_map beta_) { template void Scheme::setTheta(int theta_) { - for (auto t : theta) { - t = theta_; + for (auto& t : theta) { + t = static_cast(theta_); } } @@ -119,4 +119,4 @@ const std::unordered_map& Scheme::getTheta() const { return theta; } -} // namespace mmft \ No newline at end of file +} // namespace mmft