]> www.ginac.de Git - ginac.git/blobdiff - ginac/function.cppy
Improve method of setting status_flags::dynallocated.
[ginac.git] / ginac / function.cppy
index 7030bca66afc6759a1264b244142132e692ec317..00e4b2a677333bc7ad5481f1e44c8a3373fe7682 100644 (file)
@@ -792,8 +792,7 @@ ex function::power(const ex & power_param) const // power of function
                }
        }
        // No power function defined? Fall back to returning a power object.
-       return (new GiNaC::power(*this, power_param))->setflag(status_flags::dynallocated |
-                                                              status_flags::evaluated);
+       return dynallocate<GiNaC::power>(*this, power_param).setflag(status_flags::evaluated);
 }
 
 ex function::expand(unsigned options) const