From 53605c983d07a35aec9f8cd1c4755dfc6e1dcd11 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Thu, 1 Apr 2021 22:45:40 -0700 Subject: [PATCH] Fix functor? --- quicktex/util.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/quicktex/util.h b/quicktex/util.h index e001a06..4bf062c 100644 --- a/quicktex/util.h +++ b/quicktex/util.h @@ -100,11 +100,9 @@ template constexpr std::array ExpandAr return res; } -template constexpr auto MapArray(const std::array &input, Fn&& op) { +template constexpr auto MapArray(const std::array &input, Fn op) { std::array, N> output; - for (unsigned i = 0; i < N; i++) { - output[i] = op(input[i]); - } + for (unsigned i = 0; i < N; i++) { output[i] = op(input[i]); } return output; }