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 b92dc0b..3c8c50b 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;
        }