From 6968ab3654b7eada32a8eeab3a3dc3046b6d7fca Mon Sep 17 00:00:00 2001 From: Mahrud Sayrafi Date: Sun, 12 Mar 2023 04:20:30 -0500 Subject: [PATCH] declare gc_vector outside loop --- M2/Macaulay2/e/poly.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/M2/Macaulay2/e/poly.cpp b/M2/Macaulay2/e/poly.cpp index 1140c01bc61..59fce980d1e 100644 --- a/M2/Macaulay2/e/poly.cpp +++ b/M2/Macaulay2/e/poly.cpp @@ -1339,12 +1339,12 @@ ring_elem PolyRing::eval(const RingMap *map, // The way we collect the result depends on whether the target ring // is a polynomial ring: if so, use a heap structure. If not, just add to the // result. + gc_vector vp; const Ring *target = map->get_ring(); SumCollector *H = target->make_SumCollector(); for (Nterm& t : f) { - gc_vector vp; M_->to_varpower(t.monom, vp); H->add(map->eval_term(K_, t.coeff, vp.data(), first_var, n_vars())); }