]> www.ginac.de Git - ginac.git/blobdiff - check/exam_factor.cpp
Improve method of setting status_flags::dynallocated.
[ginac.git] / check / exam_factor.cpp
index bed95aa17057632dccc1b75a0c374e72538a0f22..754deea7f8addb9fd44a3a87f25654dcd130bf77 100644 (file)
@@ -184,7 +184,7 @@ static unsigned exam_factor3()
 
 static unsigned check_factorization(const exvector& factors)
 {
 
 static unsigned check_factorization(const exvector& factors)
 {
-       ex e = (new mul(factors))->setflag(status_flags::dynallocated);
+       ex e = dynallocate<mul>(factors);
        ex ef = factor(e.expand());
        if (ef.nops() != factors.size()) {
                clog << "wrong number of factors, expected " << factors.size() <<
        ex ef = factor(e.expand());
        if (ef.nops() != factors.size()) {
                clog << "wrong number of factors, expected " << factors.size() <<