From 2ac25d592eaa8503a60eb9a9b67b1af86dc590ba Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Tue, 26 Nov 2024 12:54:03 +0100 Subject: [PATCH] Fix multiple bindings configuration bug in binding mode specification This commit fixes the configuration of the binding mode(s) when a vector is being used to specify multiple bindings, e.g. for multiple particle types. --- src/libcadet/model/binding/LinearBinding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcadet/model/binding/LinearBinding.cpp b/src/libcadet/model/binding/LinearBinding.cpp index 0c7a1a2db..5e4afd14f 100644 --- a/src/libcadet/model/binding/LinearBinding.cpp +++ b/src/libcadet/model/binding/LinearBinding.cpp @@ -427,7 +427,7 @@ class LinearBindingBase : public IBindingModel else { // Copy what we need (ignore excess values) - std::copy_n(vecKin.begin(), _reactionQuasistationarity.size(), _reactionQuasistationarity.begin()); + std::transform(vecKin.begin(), vecKin.begin() + _reactionQuasistationarity.size(), _reactionQuasistationarity.begin(), [](int val) { return !static_cast(val); }); } } else