Skip to content

Commit

Permalink
Merge pull request #168 from RezwanArefin01/master
Browse files Browse the repository at this point in the history
Fix redundant copy in rvalue ref overload of `convolution`
  • Loading branch information
yosupo06 authored Jun 19, 2024
2 parents 78d9c24 + bc76aab commit fe9b6fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atcoder/convolution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ std::vector<mint> convolution(std::vector<mint>&& a, std::vector<mint>&& b) {
int z = (int)internal::bit_ceil((unsigned int)(n + m - 1));
assert((mint::mod() - 1) % z == 0);

if (std::min(n, m) <= 60) return convolution_naive(a, b);
return internal::convolution_fft(a, b);
if (std::min(n, m) <= 60) return convolution_naive(std::move(a), std::move(b));
return internal::convolution_fft(std::move(a), std::move(b));
}
template <class mint, internal::is_static_modint_t<mint>* = nullptr>
std::vector<mint> convolution(const std::vector<mint>& a,
Expand Down

0 comments on commit fe9b6fc

Please sign in to comment.