]> www.ginac.de Git - ginac.git/blobdiff - ginac/basic.cpp
include <algorithm> for use of std::min().
[ginac.git] / ginac / basic.cpp
index 01d369716f30870d2bf8e0eeab2441278647e97c..a2be1ca51ce4c0922ef3a361bd5fdab0dcbbb360 100644 (file)
@@ -309,7 +309,6 @@ ex basic::map(map_function & f) const
        }
 
        if (copy) {
-               copy->setflag(status_flags::dynallocated);
                copy->clearflag(status_flags::hash_calculated | status_flags::expanded);
                return *copy;
        } else
@@ -384,7 +383,7 @@ ex basic::collect(const ex & s, bool distributed) const
                        exvector resv;
                        for (auto & mi : cmap)
                                resv.push_back((mi.first)*(mi.second));
-                       return (new add(resv))->setflag(status_flags::dynallocated);
+                       return dynallocate<add>(resv);
 
                } else {
 
@@ -411,7 +410,7 @@ ex basic::collect(const ex & s, bool distributed) const
 }
 
 /** Perform automatic non-interruptive term rewriting rules. */
-ex basic::eval(int level) const
+ex basic::eval() const
 {
        // There is nothing to do for basic objects:
        return hold();
@@ -625,7 +624,6 @@ ex basic::subs(const exmap & m, unsigned options) const
 
                                // Something changed, clone the object
                                basic *copy = duplicate();
-                               copy->setflag(status_flags::dynallocated);
                                copy->clearflag(status_flags::hash_calculated | status_flags::expanded);
 
                                // Substitute the changed operand