From: Richard Kreckel Date: Mon, 5 Mar 2018 08:15:18 +0000 (+0100) Subject: Avoid multiple filling of partitions in ::get() member functions. X-Git-Tag: release_1-7-5~13 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=f532e05bf7638c592ee609943c349739500480bf;p=ginac.git Avoid multiple filling of partitions in ::get() member functions. --- diff --git a/ginac/utils.h b/ginac/utils.h index b92dc0bd..3c8c50bb 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -342,6 +342,8 @@ public: for (unsigned i = m - mpgen.m; i < m; ++i) partition[i] = mpgen.x[i - m + mpgen.m + 1]; + + current_updated = true; } return partition; } @@ -375,6 +377,8 @@ public: if (!current_updated) { for (unsigned i = 0; i < mpgen.m; ++i) partition[i] = mpgen.x[i + 1]; + + current_updated = true; } return partition; }