Skip to content

Commit c8b6031

Browse files
committed
return by ref in inplace funcs
1 parent 3c08056 commit c8b6031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cp-algo/math/poly.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace cp_algo::math {
5454

5555
poly_t substr(size_t l, size_t k) const {return poly::impl::substr(*this, l, k);}
5656

57-
poly_t operator *= (const poly_t &t) {fft::mul(a, t.a); normalize(); return *this;}
57+
poly_t& operator *= (const poly_t &t) {fft::mul(a, t.a); normalize(); return *this;}
5858
poly_t operator * (const poly_t &t) const {return poly_t(*this) *= t;}
5959

6060
poly_t& operator /= (const poly_t &t) {return *this = divmod(t)[0];}
@@ -193,7 +193,7 @@ namespace cp_algo::math {
193193
}
194194

195195
// calculate log p(x) mod x^n
196-
poly_t log_inplace(size_t n) {
196+
poly_t& log_inplace(size_t n) {
197197
assert(a[0] == T(1));
198198
auto t = mod_xk_inplace(n).inv(n);
199199
deriv_inplace();

0 commit comments

Comments
 (0)