Skip to content

Commit fe9b6fc

Browse files
authoredJun 19, 2024··
Merge pull request #168 from RezwanArefin01/master
Fix redundant copy in rvalue ref overload of `convolution`
2 parents 78d9c24 + bc76aab commit fe9b6fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎atcoder/convolution.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ std::vector<mint> convolution(std::vector<mint>&& a, std::vector<mint>&& b) {
223223
int z = (int)internal::bit_ceil((unsigned int)(n + m - 1));
224224
assert((mint::mod() - 1) % z == 0);
225225

226-
if (std::min(n, m) <= 60) return convolution_naive(a, b);
227-
return internal::convolution_fft(a, b);
226+
if (std::min(n, m) <= 60) return convolution_naive(std::move(a), std::move(b));
227+
return internal::convolution_fft(std::move(a), std::move(b));
228228
}
229229
template <class mint, internal::is_static_modint_t<mint>* = nullptr>
230230
std::vector<mint> convolution(const std::vector<mint>& a,

0 commit comments

Comments
 (0)
Please sign in to comment.