]> www.ginac.de Git - ginac.git/commitdiff
Avoid multiple filling of partitions in ::get() member functions.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 5 Mar 2018 08:15:18 +0000 (09:15 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 5 Mar 2018 08:15:18 +0000 (09:15 +0100)
ginac/utils.h

index b92dc0bd671a5889e178edef16993eafcd2d322e..3c8c50bb76db71f041379f16f125fbf3325978e2 100644 (file)
@@ -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;
        }