From a988fb1bb92afe2eccbf578a779f57a774b5ce03 Mon Sep 17 00:00:00 2001 From: allem Date: Tue, 7 Jan 2020 23:48:15 -0500 Subject: [PATCH] tweak walk signature --- include/tc/core.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/tc/core.hpp b/include/tc/core.hpp index f7ad487..2041959 100644 --- a/include/tc/core.hpp +++ b/include/tc/core.hpp @@ -33,16 +33,16 @@ namespace tc { template [[nodiscard]] std::vector walk( T start, - std::vector gen_values, - std::function op + std::vector gens, + std::function op ) const { std::vector res(size()); res[0] = start; for (int i = 1; i < res.size(); ++i) { - auto action = path[i]; - const auto &from = res[action.from_idx]; - const auto &val = gen_values[action.gen]; + auto &action = path[i]; + auto &from = res[action.from_idx]; + auto &val = gens[action.gen]; res[i] = op(from, val); }