mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Fix functor?
This commit is contained in:
parent
8cd870ed26
commit
53605c983d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user