X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fbasic.cpp;h=9d621fbb2b7eda53b66f02074ccdf5c3c754fdfe;hb=7bb797bc41e31fe098c94f0b5e57ddbba6cd26b6;hp=2065eac8b6105424c679dd41c70dd145e49b8f6e;hpb=d448856f20cb58f939ddbf636e7f72e3599b1468;p=ginac.git diff --git a/ginac/basic.cpp b/ginac/basic.cpp index 2065eac8..9d621fbb 100644 --- a/ginac/basic.cpp +++ b/ginac/basic.cpp @@ -38,27 +38,24 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS_NO_CTORS(basic, void) ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// // public basic::basic(const basic & other) : tinfo_key(TINFO_basic), flags(0), refcount(0) { - debugmsg("basic copy ctor", LOGLEVEL_CONSTRUCT); copy(other); } const basic & basic::operator=(const basic & other) { - debugmsg("basic operator=", LOGLEVEL_ASSIGNMENT); if (this != &other) { destroy(true); copy(other); @@ -83,8 +80,6 @@ const basic & basic::operator=(const basic & other) /** Construct object from archive_node. */ basic::basic(const archive_node &n, const lst &sym_lst) : flags(0), refcount(0) { - debugmsg("basic ctor from archive_node", LOGLEVEL_CONSTRUCT); - // Reconstruct tinfo_key from class name std::string class_name; if (n.find_string("class", class_name)) @@ -114,8 +109,6 @@ void basic::archive(archive_node &n) const * level for placing parentheses and formatting */ void basic::print(const print_context & c, unsigned level) const { - debugmsg("basic print", LOGLEVEL_PRINT); - if (is_of_type(c, print_tree)) { c.s << std::string(level, ' ') << class_name() @@ -161,7 +154,6 @@ unsigned basic::precedence(void) const * construction of an ex from a basic. */ basic * basic::duplicate() const { - debugmsg("basic duplicate",LOGLEVEL_DUPLICATE); return new basic(*this); } @@ -256,7 +248,7 @@ int basic::ldegree(const ex & s) const /** Return coefficient of degree n in object s. */ ex basic::coeff(const ex & s, int n) const { - return n==0 ? *this : _ex0(); + return n==0 ? *this : _ex0; } /** Sort expanded expression in terms of powers of some object(s). @@ -295,7 +287,7 @@ ex basic::collect(const ex & s, bool distributed) const while (true) { // Calculate coeff*x1^c1*...*xn^cn - ex y = _ex1(); + ex y = _ex1; for (int i=0; i