From 464cd4d5c21e5a1aae1b772898f352dd67a5a762 Mon Sep 17 00:00:00 2001 From: James Paul Turner Date: Tue, 20 Aug 2024 18:32:45 +0100 Subject: [PATCH] clang-tidy stuff Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/HealthGPS/static_linear_model.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HealthGPS/static_linear_model.cpp b/src/HealthGPS/static_linear_model.cpp index b093f707b..ac7e6cded 100644 --- a/src/HealthGPS/static_linear_model.cpp +++ b/src/HealthGPS/static_linear_model.cpp @@ -241,7 +241,8 @@ void StaticLinearModel::update_policies(Person &person, bool intervene) const { // Set zero policy if not intervening. if (!intervene) { for (size_t i = 0; i < names_.size(); i++) { - auto policy_name = core::Identifier{names_[i].to_string() + "_policy"}; + for (const auto & name : names_) { + auto policy_name = core::Identifier{name.to_string() + "_policy"}; person.risk_factors[policy_name] = 0.0; } return;