Skip to content

Commit

Permalink
Ref for scalar_value (string)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhjp01 committed Dec 11, 2024
1 parent cc5f93d commit 2cf995a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cosim/slave_simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class set_variable_cache

std::pair<gsl::span<value_reference>, gsl::span<const T>> modify_and_get(
duration deltaT,
std::optional<std::function<bool(const value_reference, const T)>> filter = std::nullopt)
std::optional<std::function<bool(const value_reference, const T&)>> filter = std::nullopt)
{
if (!hasRunModifiers_) {
for (const auto& entry : modifiers_) {
Expand Down Expand Up @@ -518,7 +518,7 @@ class slave_simulator::impl
{
auto deltaT = duration::zero();
auto filter = [this](const variable_type vt) {
return [this, vt](const value_reference vr, const cosim::scalar_value) {
return [this, vt](const value_reference vr, const cosim::scalar_value&) {
const auto& vd = this->find_variable_description(vr, vt);
return vd.variability != variable_variability::constant &&
vd.causality != variable_causality::input;
Expand Down

0 comments on commit 2cf995a

Please sign in to comment.