Fix functor?

This commit is contained in:
Andrew Cassidy 2021-04-01 22:45:40 -07:00
parent 8cd870ed26
commit 53605c983d

View File

@ -100,11 +100,9 @@ template <size_t Size, int Op(int)> constexpr std::array<uint8_t, Size> ExpandAr
return res;
}
template <typename I, typename Fn, size_t N> constexpr auto MapArray(const std::array<I, N> &input, Fn&& op) {
template <typename I, typename Fn, size_t N> constexpr auto MapArray(const std::array<I, N> &input, Fn op) {
std::array<std::invoke_result_t<Fn, I>, 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;
}