From 7905061f6487b278e08b103d4d142decb418535e Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Wed, 31 Jan 2018 12:18:37 +0100 Subject: [PATCH] Shortcut conversion ex->numeric->ex in expairseq::make_flat(). Of course, passing an ex by reference is always faster than converting it to a numeric first (even if it is a numeric). --- ginac/expairseq.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index 7ce15cb2..a67eb4e0 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -888,8 +888,7 @@ void expairseq::make_flat(const epvector &v, bool do_index_renaming) this->can_make_flat(cit)) { ex newrest = mf.handle_factor(cit.rest, cit.coeff); const expairseq &subseqref = ex_to(newrest); - combine_overall_coeff(ex_to(subseqref.overall_coeff), - ex_to(cit.coeff)); + combine_overall_coeff(subseqref.overall_coeff, cit.coeff); for (auto & cit_s : subseqref.seq) { seq.push_back(expair(cit_s.rest, ex_to(cit_s.coeff).mul_dyn(ex_to(cit.coeff)))); -- 2.49.0