From cfea748404dec5fb2f2e3310d36eeb6640f13824 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Fri, 26 Oct 2001 19:08:24 +0000 Subject: [PATCH] * As agreed upon at lunch, remove debugmsg since it is hardly of any use. --- ginac/Makefile.am | 4 ++-- ginac/add.cpp | 15 ++----------- ginac/basic.cpp | 10 +-------- ginac/basic.h | 14 +++--------- ginac/clifford.cpp | 9 +------- ginac/color.cpp | 9 +------- ginac/constant.cpp | 17 +++----------- ginac/container.pl | 14 ++---------- ginac/debugmsg.h | 52 ------------------------------------------- ginac/ex.cpp | 13 ----------- ginac/ex.h | 13 +---------- ginac/expairseq.cpp | 13 +---------- ginac/expairseq.h | 2 +- ginac/fail.cpp | 3 +-- ginac/fderivative.cpp | 12 ++-------- ginac/function.pl | 13 +---------- ginac/idx.cpp | 22 ++---------------- ginac/indexed.cpp | 19 +--------------- ginac/matrix.cpp | 14 +----------- ginac/mul.cpp | 14 +----------- ginac/ncmul.cpp | 13 +---------- ginac/numeric.cpp | 17 +------------- ginac/operators.cpp | 35 ----------------------------- ginac/power.cpp | 17 +++----------- ginac/pseries.cpp | 10 +-------- ginac/registrar.h | 10 ++------- ginac/relational.cpp | 19 +++------------- ginac/structure.cpp | 5 +---- ginac/structure.pl | 9 +------- ginac/symbol.cpp | 11 +-------- ginac/symbol.h | 8 ++----- ginac/symmetry.cpp | 10 +-------- ginac/tensor.cpp | 15 +------------ ginac/tensor.h | 2 +- ginac/utils.cpp | 4 ++-- ginac/utils.h | 12 ++-------- ginac/wildcard.cpp | 8 +------ 37 files changed, 51 insertions(+), 436 deletions(-) delete mode 100644 ginac/debugmsg.h diff --git a/ginac/Makefile.am b/ginac/Makefile.am index fc759b1e..2f2fed07 100644 --- a/ginac/Makefile.am +++ b/ginac/Makefile.am @@ -7,8 +7,8 @@ libginac_la_SOURCES = add.cpp archive.cpp basic.cpp constant.cpp ex.cpp \ normal.cpp numeric.cpp operators.cpp power.cpp registrar.cpp relational.cpp \ symbol.cpp pseries.cpp utils.cpp ncmul.cpp structure.cpp exprseq_suppl.cpp \ lst.cpp lst_suppl.cpp input_parser.yy input_lexer.ll input_lexer.h \ - remember.h remember.cpp debugmsg.h utils.h idx.cpp indexed.cpp tensor.cpp \ - color.cpp clifford.cpp wildcard.cpp symmetry.cpp fderivative.cpp tostring.h + remember.h remember.cpp utils.h idx.cpp indexed.cpp tensor.cpp color.cpp \ + clifford.cpp wildcard.cpp symmetry.cpp fderivative.cpp tostring.h libginac_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) ginacincludedir = $(includedir)/ginac diff --git a/ginac/add.cpp b/ginac/add.cpp index bdcd4999..1f71b060 100644 --- a/ginac/add.cpp +++ b/ginac/add.cpp @@ -27,7 +27,6 @@ #include "mul.h" #include "matrix.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -35,12 +34,11 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(add, expairseq) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// add::add() { - debugmsg("add default constructor",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_add; } @@ -55,7 +53,6 @@ DEFAULT_DESTROY(add) add::add(const ex & lh, const ex & rh) { - debugmsg("add constructor from ex,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_add; overall_coeff = _ex0; construct_from_2_ex(lh,rh); @@ -64,7 +61,6 @@ add::add(const ex & lh, const ex & rh) add::add(const exvector & v) { - debugmsg("add constructor from exvector",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_add; overall_coeff = _ex0; construct_from_exvector(v); @@ -73,7 +69,6 @@ add::add(const exvector & v) add::add(const epvector & v) { - debugmsg("add constructor from epvector",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_add; overall_coeff = _ex0; construct_from_epvector(v); @@ -82,7 +77,6 @@ add::add(const epvector & v) add::add(const epvector & v, const ex & oc) { - debugmsg("add constructor from epvector,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_add; overall_coeff = oc; construct_from_epvector(v); @@ -91,7 +85,6 @@ add::add(const epvector & v, const ex & oc) add::add(epvector * vp, const ex & oc) { - debugmsg("add constructor from epvector *,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_add; GINAC_ASSERT(vp!=0); overall_coeff = oc; @@ -114,8 +107,6 @@ DEFAULT_ARCHIVING(add) void add::print(const print_context & c, unsigned level) const { - debugmsg("add print", LOGLEVEL_PRINT); - if (is_a(c)) { inherited::print(c, level); @@ -316,8 +307,6 @@ ex add::coeff(const ex & s, int n) const * @param level cut-off in recursive evaluation */ ex add::eval(int level) const { - debugmsg("add eval",LOGLEVEL_MEMBER_FUNCTION); - epvector *evaled_seqp = evalchildren(level); if (evaled_seqp) { // do more evaluation later @@ -378,7 +367,7 @@ ex add::evalm(void) const sum = sum.add(ex_to(m)); } else all_matrices = false; - it++; + ++it; } if (all_matrices) { diff --git a/ginac/basic.cpp b/ginac/basic.cpp index f0fdee78..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); } diff --git a/ginac/basic.h b/ginac/basic.h index 1268d002..e5c3069d 100644 --- a/ginac/basic.h +++ b/ginac/basic.h @@ -33,7 +33,6 @@ #include "tinfos.h" #include "assertion.h" #include "registrar.h" -/*#include "debugmsg.h"*/ namespace GiNaC { @@ -64,16 +63,12 @@ class basic friend class ex; - // default ctor, dtor, copy ctor assignment operator and helpers + // default ctor, dtor, copy ctor, assignment operator and helpers public: - basic() : tinfo_key(TINFO_basic), flags(0), refcount(0) - { - /* debugmsg("basic default ctor", LOGLEVEL_CONSTRUCT); */ - } + basic() : tinfo_key(TINFO_basic), flags(0), refcount(0) {} /** basic dtor, virtual because class ex will delete objects via ptr. */ virtual ~basic() { - /* debugmsg("basic dtor", LOGLEVEL_DESTRUCT); */ destroy(false); GINAC_ASSERT((!(flags & status_flags::dynallocated))||(refcount==0)); } @@ -92,10 +87,7 @@ protected: // other ctors /** ctor with specified tinfo_key */ - basic(unsigned ti) : tinfo_key(ti), flags(0), refcount(0) - { - /* debugmsg("basic ctor with tinfo_key", LOGLEVEL_CONSTRUCT); */ - } + basic(unsigned ti) : tinfo_key(ti), flags(0), refcount(0) {} // new virtual functions which can be overridden by derived classes public: // only const functions please (may break reference counting) diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index 131a00ee..11f84d0c 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -32,7 +32,6 @@ #include "mul.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" #include @@ -45,12 +44,11 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(diracgamma, tensor) GINAC_IMPLEMENT_REGISTERED_CLASS(diracgamma5, tensor) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// clifford::clifford() : representation_label(0) { - debugmsg("clifford default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_clifford; } @@ -74,7 +72,6 @@ DEFAULT_CTORS(diracgamma5) * @see dirac_ONE */ clifford::clifford(const ex & b, unsigned char rl) : inherited(b), representation_label(rl) { - debugmsg("clifford constructor from ex", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_clifford; } @@ -83,20 +80,17 @@ clifford::clifford(const ex & b, unsigned char rl) : inherited(b), representatio * @see dirac_gamma */ clifford::clifford(const ex & b, const ex & mu, unsigned char rl) : inherited(b, mu), representation_label(rl) { - debugmsg("clifford constructor from ex,ex", LOGLEVEL_CONSTRUCT); GINAC_ASSERT(is_a(mu)); tinfo_key = TINFO_clifford; } clifford::clifford(unsigned char rl, const exvector & v, bool discardable) : inherited(sy_none(), v, discardable), representation_label(rl) { - debugmsg("clifford constructor from unsigned char,exvector", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_clifford; } clifford::clifford(unsigned char rl, exvector * vp) : inherited(sy_none(), vp), representation_label(rl) { - debugmsg("clifford constructor from unsigned char,exvector *", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_clifford; } @@ -106,7 +100,6 @@ clifford::clifford(unsigned char rl, exvector * vp) : inherited(sy_none(), vp), clifford::clifford(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("clifford constructor from archive_node", LOGLEVEL_CONSTRUCT); unsigned rl; n.find_unsigned("label", rl); representation_label = rl; diff --git a/ginac/color.cpp b/ginac/color.cpp index 642da5c0..dd8ee18d 100644 --- a/ginac/color.cpp +++ b/ginac/color.cpp @@ -33,7 +33,6 @@ #include "symbol.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -45,12 +44,11 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(su3f, tensor) GINAC_IMPLEMENT_REGISTERED_CLASS(su3d, tensor) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// color::color() : representation_label(0) { - debugmsg("color default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_color; } @@ -75,7 +73,6 @@ DEFAULT_CTORS(su3d) * @see color_ONE */ color::color(const ex & b, unsigned char rl) : inherited(b), representation_label(rl) { - debugmsg("color constructor from ex,unsigned char", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_color; } @@ -84,19 +81,16 @@ color::color(const ex & b, unsigned char rl) : inherited(b), representation_labe * @see color_T */ color::color(const ex & b, const ex & i1, unsigned char rl) : inherited(b, i1), representation_label(rl) { - debugmsg("color constructor from ex,ex,unsigned char", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_color; } color::color(unsigned char rl, const exvector & v, bool discardable) : inherited(sy_none(), v, discardable), representation_label(rl) { - debugmsg("color constructor from unsigned char,exvector", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_color; } color::color(unsigned char rl, exvector * vp) : inherited(sy_none(), vp), representation_label(rl) { - debugmsg("color constructor from unsigned char,exvector *", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_color; } @@ -106,7 +100,6 @@ color::color(unsigned char rl, exvector * vp) : inherited(sy_none(), vp), repres color::color(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("color constructor from archive_node", LOGLEVEL_CONSTRUCT); unsigned rl; n.find_unsigned("label", rl); representation_label = rl; diff --git a/ginac/constant.cpp b/ginac/constant.cpp index ce4c80d9..d6c07409 100644 --- a/ginac/constant.cpp +++ b/ginac/constant.cpp @@ -28,7 +28,6 @@ #include "ex.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -36,15 +35,12 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(constant, basic) ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// // public -constant::constant() : basic(TINFO_constant), ef(0), number(0), serial(next_serial++) -{ - debugmsg("constant default ctor",LOGLEVEL_CONSTRUCT); -} +constant::constant() : basic(TINFO_constant), ef(0), number(0), serial(next_serial++) {} // protected @@ -78,7 +74,6 @@ void constant::destroy(bool call_parent) constant::constant(const std::string & initname, evalffunctype efun, const std::string & texname) : basic(TINFO_constant), name(initname), ef(efun), number(0), serial(next_serial++) { - debugmsg("constant ctor from string, function",LOGLEVEL_CONSTRUCT); if (texname.empty()) TeX_name = "\\mbox{" + name + "}"; else @@ -89,7 +84,6 @@ constant::constant(const std::string & initname, evalffunctype efun, const std:: constant::constant(const std::string & initname, const numeric & initnumber, const std::string & texname) : basic(TINFO_constant), name(initname), ef(0), number(new numeric(initnumber)), serial(next_serial++) { - debugmsg("constant ctor from string, numeric",LOGLEVEL_CONSTRUCT); if (texname.empty()) TeX_name = "\\mbox{" + name + "}"; else @@ -101,10 +95,7 @@ constant::constant(const std::string & initname, const numeric & initnumber, con // archiving ////////// -constant::constant(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) -{ - debugmsg("constant ctor from archive_node", LOGLEVEL_CONSTRUCT); -} +constant::constant(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) {} ex constant::unarchive(const archive_node &n, const lst &sym_lst) { @@ -138,8 +129,6 @@ void constant::archive(archive_node &n) const void constant::print(const print_context & c, unsigned level) const { - debugmsg("constant print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << name << " (" << class_name() << ")" << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec diff --git a/ginac/container.pl b/ginac/container.pl index 8004383a..5e4837d1 100755 --- a/ginac/container.pl +++ b/ginac/container.pl @@ -168,7 +168,6 @@ $constructors_implementation=generate( <<'END_OF_CONSTRUCTORS_IMPLEMENTATION','const ex & param${N}',', ',' seq.push_back(param${N});',"\n"); ${CONTAINER}::${CONTAINER}(${SEQ1}) : basic(TINFO_${CONTAINER}) { - debugmsg(\"${CONTAINER} ctor from ${N}*ex\",LOGLEVEL_CONSTRUCT); RESERVE(seq,${N}); ${SEQ2} } @@ -324,7 +323,6 @@ $implementation=<(s)); } else { @@ -375,7 +369,6 @@ ${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) : basic(TINFO_$ ${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER}) { - debugmsg("${CONTAINER} ctor from ${STLT} *",LOGLEVEL_CONSTRUCT); GINAC_ASSERT(vp!=0); seq.swap(*vp); delete vp; @@ -390,7 +383,6 @@ ${constructors_implementation} /** Construct object from archive_node. */ ${CONTAINER}::${CONTAINER}(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("${CONTAINER} ctor from archive_node", LOGLEVEL_CONSTRUCT); for (unsigned int i=0; true; i++) { ex e; if (n.find_ex("seq", e, sym_lst, i)) @@ -425,8 +417,6 @@ void ${CONTAINER}::archive(archive_node &n) const void ${CONTAINER}::print(const print_context & c, unsigned level) const { - debugmsg("${CONTAINER} print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() diff --git a/ginac/debugmsg.h b/ginac/debugmsg.h deleted file mode 100644 index 08457b5a..00000000 --- a/ginac/debugmsg.h +++ /dev/null @@ -1,52 +0,0 @@ -/** @file debugmsg.h - * - * Utilities needed for debugging only. */ - -/* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __GINAC_DEBUGMSG_H__ -#define __GINAC_DEBUGMSG_H__ - -#include - -#ifdef _DEBUG -#define VERBOSE -#define DO_GINAC_ASSERT (VERBOSE||DEBUG) -#endif - -#define LOGLEVEL_CONSTRUCT 0x0001 -#define LOGLEVEL_DESTRUCT 0x0002 -#define LOGLEVEL_ASSIGNMENT 0x0004 -#define LOGLEVEL_DUPLICATE 0x0008 -#define LOGLEVEL_PRINT 0x0010 -#define LOGLEVEL_OPERATOR 0x0020 -#define LOGLEVEL_MEMBER_FUNCTION 0x4000 -#define LOGLEVEL_NONMEMBER_FUNCTION 0x8000 -#define LOGLEVEL_ALL 0xffff - -#define LOGMASK (LOGLEVEL_PRINT) -// #define LOGMASK (LOGLEVEL_PRINT | LOGLEVEL_ASSIGNMENT | LOGLEVEL_OPERATOR | LOGLEVEL_DUPLICATE | LOGLEVEL_OPERATOR | LOGLEVEL_MEMBER_FUNCTION | LOGLEVEL_NONMEMBER_FUNCTION) - -#ifdef VERBOSE -#define debugmsg(msg, loglevel) if ((loglevel) & ~LOGMASK) std::clog << (msg) << std::endl; -#else -#define debugmsg(msg, loglevel) -#endif // def VERBOSE - -#endif // ndef __GINAC_DEBUGMSG_H__ diff --git a/ginac/ex.cpp b/ginac/ex.cpp index b35cd8c8..944285d1 100644 --- a/ginac/ex.cpp +++ b/ginac/ex.cpp @@ -32,7 +32,6 @@ #include "lst.h" #include "relational.h" #include "input_lexer.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -52,8 +51,6 @@ namespace GiNaC { /** Efficiently swap the contents of two expressions. */ void ex::swap(ex & other) { - debugmsg("ex swap",LOGLEVEL_MEMBER_FUNCTION); - GINAC_ASSERT(bp!=0); GINAC_ASSERT(bp->flags & status_flags::dynallocated); GINAC_ASSERT(other.bp!=0); @@ -71,7 +68,6 @@ void ex::swap(ex & other) * @see print_context */ void ex::print(const print_context & c, unsigned level) const { - debugmsg("ex print", LOGLEVEL_PRINT); GINAC_ASSERT(bp!=0); bp->print(c, level); } @@ -79,7 +75,6 @@ void ex::print(const print_context & c, unsigned level) const /** Print expression to stream in a tree-like format suitable for debugging. */ void ex::printtree(std::ostream & os) const { - debugmsg("ex printtree", LOGLEVEL_PRINT); GINAC_ASSERT(bp!=0); bp->print(print_tree(os)); } @@ -87,7 +82,6 @@ void ex::printtree(std::ostream & os) const /** Little wrapper arount print to be called within a debugger. */ void ex::dbgprint(void) const { - debugmsg("ex dbgprint", LOGLEVEL_PRINT); GINAC_ASSERT(bp!=0); bp->dbgprint(); } @@ -95,7 +89,6 @@ void ex::dbgprint(void) const /** Little wrapper arount printtree to be called within a debugger. */ void ex::dbgprinttree(void) const { - debugmsg("ex dbgprinttree", LOGLEVEL_PRINT); GINAC_ASSERT(bp!=0); bp->dbgprinttree(); } @@ -152,14 +145,12 @@ bool ex::find(const ex & pattern, lst & found) const ex ex::operator[](const ex & index) const { - debugmsg("ex operator[ex]",LOGLEVEL_OPERATOR); GINAC_ASSERT(bp!=0); return (*bp)[index]; } ex ex::operator[](int i) const { - debugmsg("ex operator[int]",LOGLEVEL_OPERATOR); GINAC_ASSERT(bp!=0); return (*bp)[i]; } @@ -167,7 +158,6 @@ ex ex::operator[](int i) const /** Return modifyable operand/member at position i. */ ex & ex::let_op(int i) { - debugmsg("ex let_op()",LOGLEVEL_MEMBER_FUNCTION); makewriteable(); GINAC_ASSERT(bp!=0); return bp->let_op(i); @@ -176,7 +166,6 @@ ex & ex::let_op(int i) /** Left hand side of relational expression. */ ex ex::lhs(void) const { - debugmsg("ex lhs()",LOGLEVEL_MEMBER_FUNCTION); if (!is_ex_of_type(*this,relational)) throw std::runtime_error("ex::lhs(): not a relation"); return (*static_cast(bp)).lhs(); @@ -185,7 +174,6 @@ ex ex::lhs(void) const /** Right hand side of relational expression. */ ex ex::rhs(void) const { - debugmsg("ex rhs()",LOGLEVEL_MEMBER_FUNCTION); if (!is_ex_of_type(*this,relational)) throw std::runtime_error("ex::rhs(): not a relation"); return (*static_cast(bp)).rhs(); @@ -197,7 +185,6 @@ ex ex::rhs(void) const * unlinking the object and creating an unshared copy of it. */ void ex::makewriteable() { - debugmsg("ex makewriteable",LOGLEVEL_MEMBER_FUNCTION); GINAC_ASSERT(bp!=0); GINAC_ASSERT(bp->flags & status_flags::dynallocated); if (bp->refcount > 1) { diff --git a/ginac/ex.h b/ginac/ex.h index f119c85b..c76290ff 100644 --- a/ginac/ex.h +++ b/ginac/ex.h @@ -74,7 +74,7 @@ class ex // member functions - // default ctor, dtor, copy ctor assignment operator and helpers + // default ctor, dtor, copy ctor, assignment operator and helpers public: ex(); ~ex(); @@ -210,7 +210,6 @@ public: inline ex::ex() { - /* debugmsg("ex default ctor",LOGLEVEL_CONSTRUCT); */ extern const class numeric *_num0_p; bp = (basic*)_num0_p; GINAC_ASSERT(bp!=0); @@ -224,7 +223,6 @@ ex::ex() inline ex::~ex() { - /*debugmsg("ex dtor",LOGLEVEL_DESTRUCT);*/ GINAC_ASSERT(bp!=0); GINAC_ASSERT(bp->flags & status_flags::dynallocated); if (--bp->refcount == 0) @@ -234,7 +232,6 @@ ex::~ex() inline ex::ex(const ex & other) : bp(other.bp) { - /*debugmsg("ex copy ctor",LOGLEVEL_CONSTRUCT);*/ GINAC_ASSERT(bp!=0); GINAC_ASSERT((bp->flags) & status_flags::dynallocated); ++bp->refcount; @@ -246,7 +243,6 @@ ex::ex(const ex & other) : bp(other.bp) inline ex & ex::operator=(const ex & other) { - /*debugmsg("ex operator=",LOGLEVEL_ASSIGNMENT);*/ GINAC_ASSERT(bp!=0); GINAC_ASSERT(bp->flags & status_flags::dynallocated); GINAC_ASSERT(other.bp!=0); @@ -265,7 +261,6 @@ ex & ex::operator=(const ex & other) inline ex::ex(const basic & other) { - /*debugmsg("ex ctor from basic",LOGLEVEL_CONSTRUCT);*/ construct_from_basic(other); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); @@ -275,7 +270,6 @@ ex::ex(const basic & other) inline ex::ex(int i) { - /*debugmsg("ex ctor from int",LOGLEVEL_CONSTRUCT);*/ construct_from_int(i); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); @@ -285,7 +279,6 @@ ex::ex(int i) inline ex::ex(unsigned int i) { - /*debugmsg("ex ctor from unsigned int",LOGLEVEL_CONSTRUCT);*/ construct_from_uint(i); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); @@ -295,7 +288,6 @@ ex::ex(unsigned int i) inline ex::ex(long i) { - /*debugmsg("ex ctor from long",LOGLEVEL_CONSTRUCT);*/ construct_from_long(i); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); @@ -305,7 +297,6 @@ ex::ex(long i) inline ex::ex(unsigned long i) { - /*debugmsg("ex ctor from unsigned long",LOGLEVEL_CONSTRUCT);*/ construct_from_ulong(i); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); @@ -315,7 +306,6 @@ ex::ex(unsigned long i) inline ex::ex(double const d) { - /*debugmsg("ex ctor from double",LOGLEVEL_CONSTRUCT);*/ construct_from_double(d); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); @@ -325,7 +315,6 @@ ex::ex(double const d) inline ex::ex(const std::string &s, const ex &l) { - /*debugmsg("ex ctor from string,lst",LOGLEVEL_CONSTRUCT);*/ construct_from_string_and_lst(s, l); #ifdef OBSCURE_CINT_HACK update_last_created_or_assigned_bp(); diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index a2673e58..f0356536 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -32,7 +32,6 @@ #include "wildcard.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" #if EXPAIRSEQ_USE_HASHTAB @@ -58,20 +57,18 @@ public: }; ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// // public expairseq::expairseq(const expairseq &other) { - debugmsg("expairseq copy ctor",LOGLEVEL_CONSTRUCT); copy(other); } const expairseq &expairseq::operator=(const expairseq &other) { - debugmsg("expairseq operator=",LOGLEVEL_ASSIGNMENT); if (this != &other) { destroy(true); copy(other); @@ -115,14 +112,12 @@ DEFAULT_DESTROY(expairseq) expairseq::expairseq(const ex &lh, const ex &rh) : inherited(TINFO_expairseq) { - debugmsg("expairseq ctor from ex,ex",LOGLEVEL_CONSTRUCT); construct_from_2_ex(lh,rh); GINAC_ASSERT(is_canonical()); } expairseq::expairseq(const exvector &v) : inherited(TINFO_expairseq) { - debugmsg("expairseq ctor from exvector",LOGLEVEL_CONSTRUCT); construct_from_exvector(v); GINAC_ASSERT(is_canonical()); } @@ -130,7 +125,6 @@ expairseq::expairseq(const exvector &v) : inherited(TINFO_expairseq) expairseq::expairseq(const epvector &v, const ex &oc) : inherited(TINFO_expairseq), overall_coeff(oc) { - debugmsg("expairseq ctor from epvector,ex",LOGLEVEL_CONSTRUCT); construct_from_epvector(v); GINAC_ASSERT(is_canonical()); } @@ -138,7 +132,6 @@ expairseq::expairseq(const epvector &v, const ex &oc) expairseq::expairseq(epvector *vp, const ex &oc) : inherited(TINFO_expairseq), overall_coeff(oc) { - debugmsg("expairseq ctor from epvector *,ex",LOGLEVEL_CONSTRUCT); GINAC_ASSERT(vp!=0); construct_from_epvector(*vp); delete vp; @@ -154,7 +147,6 @@ expairseq::expairseq(const archive_node &n, const lst &sym_lst) : inherited(n, s , hashtabsize(0) #endif { - debugmsg("expairseq ctor from archive_node", LOGLEVEL_CONSTRUCT); for (unsigned int i=0; true; i++) { ex rest; ex coeff; @@ -188,14 +180,11 @@ DEFAULT_UNARCHIVE(expairseq) basic *expairseq::duplicate() const { - debugmsg("expairseq duplicate",LOGLEVEL_DUPLICATE); return new expairseq(*this); } void expairseq::print(const print_context &c, unsigned level) const { - debugmsg("expairseq print",LOGLEVEL_PRINT); - if (is_of_type(c, print_tree)) { unsigned delta_indent = static_cast(c).delta_indent; diff --git a/ginac/expairseq.h b/ginac/expairseq.h index 5a24edd5..11de71b8 100644 --- a/ginac/expairseq.h +++ b/ginac/expairseq.h @@ -63,7 +63,7 @@ class expairseq : public basic // member functions - // default ctor, dtor, copy ctor assignment operator and helpers + // default ctor, dtor, copy ctor, assignment operator and helpers public: expairseq() : basic(TINFO_expairseq) #if EXPAIRSEQ_USE_HASHTAB diff --git a/ginac/fail.cpp b/ginac/fail.cpp index d3ed59a2..bbbff1b2 100644 --- a/ginac/fail.cpp +++ b/ginac/fail.cpp @@ -24,7 +24,6 @@ #include "fail.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -32,7 +31,7 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(fail, basic) ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// DEFAULT_CTORS(fail) diff --git a/ginac/fderivative.cpp b/ginac/fderivative.cpp index 23fc8376..cefa165d 100644 --- a/ginac/fderivative.cpp +++ b/ginac/fderivative.cpp @@ -23,7 +23,6 @@ #include "fderivative.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -31,12 +30,11 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(fderivative, function) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// fderivative::fderivative() { - debugmsg("fderivative default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_fderivative; } @@ -54,20 +52,17 @@ DEFAULT_DESTROY(fderivative) fderivative::fderivative(unsigned ser, unsigned param, const exvector & args) : function(ser, args) { - debugmsg("fderivative constructor from unsigned,unsigned,exvector", LOGLEVEL_CONSTRUCT); parameter_set.insert(param); tinfo_key = TINFO_fderivative; } fderivative::fderivative(unsigned ser, const paramset & params, const exvector & args) : function(ser, args), parameter_set(params) { - debugmsg("fderivative constructor from unsigned,paramset,exvector", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_fderivative; } fderivative::fderivative(unsigned ser, const paramset & params, exvector * vp) : function(ser, vp), parameter_set(params) { - debugmsg("fderivative constructor from unsigned,paramset,exvector *", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_fderivative; } @@ -77,7 +72,6 @@ fderivative::fderivative(unsigned ser, const paramset & params, exvector * vp) : fderivative::fderivative(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("fderivative constructor from archive_node", LOGLEVEL_CONSTRUCT); unsigned i = 0; while (true) { unsigned u; @@ -85,7 +79,7 @@ fderivative::fderivative(const archive_node &n, const lst &sym_lst) : inherited( parameter_set.insert(u); else break; - i++; + ++i; } } @@ -107,8 +101,6 @@ DEFAULT_UNARCHIVE(fderivative) void fderivative::print(const print_context & c, unsigned level) const { - debugmsg("fderivative print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() << " " diff --git a/ginac/function.pl b/ginac/function.pl index 0b92e193..ad77345d 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -80,7 +80,6 @@ $constructors_implementation=generate( function::function(unsigned ser, ${SEQ1}) : exprseq(${SEQ2}), serial(ser) { - debugmsg(\"function ctor from unsigned,${N}*ex\",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_function; } END_OF_CONSTRUCTORS_IMPLEMENTATION @@ -440,7 +439,6 @@ $implementation=< 0); if (is_of_type(c, print_tree)) { diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index df262238..8afa7b58 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -35,7 +35,6 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { @@ -48,7 +47,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(matrix, basic) /** Default ctor. Initializes to 1 x 1-dimensional zero-matrix. */ matrix::matrix() : inherited(TINFO_matrix), row(1), col(1) { - debugmsg("matrix default ctor",LOGLEVEL_CONSTRUCT); m.push_back(_ex0); } @@ -75,7 +73,6 @@ DEFAULT_DESTROY(matrix) matrix::matrix(unsigned r, unsigned c) : inherited(TINFO_matrix), row(r), col(c) { - debugmsg("matrix ctor from unsigned,unsigned",LOGLEVEL_CONSTRUCT); m.resize(r*c, _ex0); } @@ -83,10 +80,7 @@ matrix::matrix(unsigned r, unsigned c) /** Ctor from representation, for internal use only. */ matrix::matrix(unsigned r, unsigned c, const exvector & m2) - : inherited(TINFO_matrix), row(r), col(c), m(m2) -{ - debugmsg("matrix ctor from unsigned,unsigned,exvector",LOGLEVEL_CONSTRUCT); -} + : inherited(TINFO_matrix), row(r), col(c), m(m2) {} /** Construct matrix from (flat) list of elements. If the list has fewer * elements than the matrix, the remaining matrix elements are set to zero. @@ -95,7 +89,6 @@ matrix::matrix(unsigned r, unsigned c, const exvector & m2) matrix::matrix(unsigned r, unsigned c, const lst & l) : inherited(TINFO_matrix), row(r), col(c) { - debugmsg("matrix ctor from unsigned,unsigned,lst",LOGLEVEL_CONSTRUCT); m.resize(r*c, _ex0); for (unsigned i=0; i(c)) { inherited::print(c, level); @@ -201,8 +191,6 @@ ex & matrix::let_op(int i) /** Evaluate matrix entry by entry. */ ex matrix::eval(int level) const { - debugmsg("matrix eval",LOGLEVEL_MEMBER_FUNCTION); - // check if we have to do anything at all if ((level==1)&&(flags & status_flags::evaluated)) return *this; diff --git a/ginac/mul.cpp b/ginac/mul.cpp index d4117944..83bebb26 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -28,7 +28,6 @@ #include "power.h" #include "matrix.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -36,12 +35,11 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(mul, expairseq) ////////// -// default ctor, dctor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// mul::mul() { - debugmsg("mul default ctor",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; } @@ -56,7 +54,6 @@ DEFAULT_DESTROY(mul) mul::mul(const ex & lh, const ex & rh) { - debugmsg("mul ctor from ex,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; overall_coeff = _ex1; construct_from_2_ex(lh,rh); @@ -65,7 +62,6 @@ mul::mul(const ex & lh, const ex & rh) mul::mul(const exvector & v) { - debugmsg("mul ctor from exvector",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; overall_coeff = _ex1; construct_from_exvector(v); @@ -74,7 +70,6 @@ mul::mul(const exvector & v) mul::mul(const epvector & v) { - debugmsg("mul ctor from epvector",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; overall_coeff = _ex1; construct_from_epvector(v); @@ -83,7 +78,6 @@ mul::mul(const epvector & v) mul::mul(const epvector & v, const ex & oc) { - debugmsg("mul ctor from epvector,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; overall_coeff = oc; construct_from_epvector(v); @@ -92,7 +86,6 @@ mul::mul(const epvector & v, const ex & oc) mul::mul(epvector * vp, const ex & oc) { - debugmsg("mul ctor from epvector *,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; GINAC_ASSERT(vp!=0); overall_coeff = oc; @@ -103,7 +96,6 @@ mul::mul(epvector * vp, const ex & oc) mul::mul(const ex & lh, const ex & mh, const ex & rh) { - debugmsg("mul ctor from ex,ex,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_mul; exvector factors; factors.reserve(3); @@ -129,8 +121,6 @@ DEFAULT_ARCHIVING(mul) void mul::print(const print_context & c, unsigned level) const { - debugmsg("mul print", LOGLEVEL_PRINT); - if (is_a(c)) { inherited::print(c, level); @@ -341,8 +331,6 @@ ex mul::coeff(const ex & s, int n) const * @param level cut-off in recursive evaluation */ ex mul::eval(int level) const { - debugmsg("mul eval",LOGLEVEL_MEMBER_FUNCTION); - epvector *evaled_seqp = evalchildren(level); if (evaled_seqp) { // do more evaluation later diff --git a/ginac/ncmul.cpp b/ginac/ncmul.cpp index 21cdefda..a12fd6fa 100644 --- a/ginac/ncmul.cpp +++ b/ginac/ncmul.cpp @@ -31,7 +31,6 @@ #include "matrix.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -39,12 +38,11 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(ncmul, exprseq) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// ncmul::ncmul() { - debugmsg("ncmul default constructor",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } @@ -59,46 +57,39 @@ DEFAULT_DESTROY(ncmul) ncmul::ncmul(const ex & lh, const ex & rh) : inherited(lh,rh) { - debugmsg("ncmul constructor from ex,ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3) : inherited(f1,f2,f3) { - debugmsg("ncmul constructor from 3 ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3, const ex & f4) : inherited(f1,f2,f3,f4) { - debugmsg("ncmul constructor from 4 ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3, const ex & f4, const ex & f5) : inherited(f1,f2,f3,f4,f5) { - debugmsg("ncmul constructor from 5 ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3, const ex & f4, const ex & f5, const ex & f6) : inherited(f1,f2,f3,f4,f5,f6) { - debugmsg("ncmul constructor from 6 ex",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } ncmul::ncmul(const exvector & v, bool discardable) : inherited(v,discardable) { - debugmsg("ncmul constructor from exvector,bool",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } ncmul::ncmul(exvector * vp) : inherited(vp) { - debugmsg("ncmul constructor from exvector *",LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_ncmul; } @@ -116,8 +107,6 @@ DEFAULT_ARCHIVING(ncmul) void ncmul::print(const print_context & c, unsigned level) const { - debugmsg("ncmul print", LOGLEVEL_PRINT); - if (is_a(c)) { inherited::print(c, level); diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 72668220..96543bb0 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -35,7 +35,6 @@ #include "ex.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "tostring.h" #include "utils.h" @@ -63,14 +62,12 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(numeric, basic) ////////// -// default ctor, dtor, copy ctor assignment -// operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// /** default ctor. Numerically it initializes to an integer zero. */ numeric::numeric() : basic(TINFO_numeric) { - debugmsg("numeric default ctor", LOGLEVEL_CONSTRUCT); value = cln::cl_I(0); setflag(status_flags::evaluated | status_flags::expanded); } @@ -91,7 +88,6 @@ DEFAULT_DESTROY(numeric) numeric::numeric(int i) : basic(TINFO_numeric) { - debugmsg("numeric ctor from int",LOGLEVEL_CONSTRUCT); // Not the whole int-range is available if we don't cast to long // first. This is due to the behaviour of the cl_I-ctor, which // emphasizes efficiency. However, if the integer is small enough, @@ -107,7 +103,6 @@ numeric::numeric(int i) : basic(TINFO_numeric) numeric::numeric(unsigned int i) : basic(TINFO_numeric) { - debugmsg("numeric ctor from uint",LOGLEVEL_CONSTRUCT); // Not the whole uint-range is available if we don't cast to ulong // first. This is due to the behaviour of the cl_I-ctor, which // emphasizes efficiency. However, if the integer is small enough, @@ -123,7 +118,6 @@ numeric::numeric(unsigned int i) : basic(TINFO_numeric) numeric::numeric(long i) : basic(TINFO_numeric) { - debugmsg("numeric ctor from long",LOGLEVEL_CONSTRUCT); value = cln::cl_I(i); setflag(status_flags::evaluated | status_flags::expanded); } @@ -131,7 +125,6 @@ numeric::numeric(long i) : basic(TINFO_numeric) numeric::numeric(unsigned long i) : basic(TINFO_numeric) { - debugmsg("numeric ctor from ulong",LOGLEVEL_CONSTRUCT); value = cln::cl_I(i); setflag(status_flags::evaluated | status_flags::expanded); } @@ -141,7 +134,6 @@ numeric::numeric(unsigned long i) : basic(TINFO_numeric) * @exception overflow_error (division by zero) */ numeric::numeric(long numer, long denom) : basic(TINFO_numeric) { - debugmsg("numeric ctor from long/long",LOGLEVEL_CONSTRUCT); if (!denom) throw std::overflow_error("division by zero"); value = cln::cl_I(numer) / cln::cl_I(denom); @@ -151,7 +143,6 @@ numeric::numeric(long numer, long denom) : basic(TINFO_numeric) numeric::numeric(double d) : basic(TINFO_numeric) { - debugmsg("numeric ctor from double",LOGLEVEL_CONSTRUCT); // We really want to explicitly use the type cl_LF instead of the // more general cl_F, since that would give us a cl_DF only which // will not be promoted to cl_LF if overflow occurs: @@ -164,7 +155,6 @@ numeric::numeric(double d) : basic(TINFO_numeric) * notation like "2+5*I". */ numeric::numeric(const char *s) : basic(TINFO_numeric) { - debugmsg("numeric ctor from string",LOGLEVEL_CONSTRUCT); cln::cl_N ctorval = 0; // parse complex numbers (functional but not completely safe, unfortunately // std::string does not understand regexpese): @@ -236,7 +226,6 @@ numeric::numeric(const char *s) : basic(TINFO_numeric) * only. */ numeric::numeric(const cln::cl_N &z) : basic(TINFO_numeric) { - debugmsg("numeric ctor from cl_N", LOGLEVEL_CONSTRUCT); value = z; setflag(status_flags::evaluated | status_flags::expanded); } @@ -247,7 +236,6 @@ numeric::numeric(const cln::cl_N &z) : basic(TINFO_numeric) numeric::numeric(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("numeric ctor from archive_node", LOGLEVEL_CONSTRUCT); cln::cl_N ctorval = 0; // Read number as string @@ -347,8 +335,6 @@ static void print_real_number(const print_context & c, const cln::cl_R &x) * @see print_real_number() */ void numeric::print(const print_context & c, unsigned level) const { - debugmsg("numeric print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << cln::the(value) @@ -1835,7 +1821,6 @@ _numeric_digits::operator long() /** Append global Digits object to ostream. */ void _numeric_digits::print(std::ostream &os) const { - debugmsg("_numeric_digits print", LOGLEVEL_PRINT); os << digits; } diff --git a/ginac/operators.cpp b/ginac/operators.cpp index c638e3d7..e95803a5 100644 --- a/ginac/operators.cpp +++ b/ginac/operators.cpp @@ -28,7 +28,6 @@ #include "ncmul.h" #include "relational.h" #include "print.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -62,25 +61,21 @@ static inline const ex exminus(const ex & lh) const ex operator+(const ex & lh, const ex & rh) { - debugmsg("operator+(ex,ex)",LOGLEVEL_OPERATOR); return exadd(lh, rh); } const ex operator-(const ex & lh, const ex & rh) { - debugmsg("operator-(ex,ex)",LOGLEVEL_OPERATOR); return exadd(lh, exminus(rh)); } const ex operator*(const ex & lh, const ex & rh) { - debugmsg("operator*(ex,ex)",LOGLEVEL_OPERATOR); return exmul(lh, rh); } const ex operator/(const ex & lh, const ex & rh) { - debugmsg("operator/(ex,ex)",LOGLEVEL_OPERATOR); return exmul(lh, power(rh,_ex_1)); } @@ -89,25 +84,21 @@ const ex operator/(const ex & lh, const ex & rh) const numeric operator+(const numeric & lh, const numeric & rh) { - debugmsg("operator+(numeric,numeric)",LOGLEVEL_OPERATOR); return lh.add(rh); } const numeric operator-(const numeric & lh, const numeric & rh) { - debugmsg("operator-(numeric,numeric)",LOGLEVEL_OPERATOR); return lh.sub(rh); } const numeric operator*(const numeric & lh, const numeric & rh) { - debugmsg("operator*(numeric,numeric)",LOGLEVEL_OPERATOR); return lh.mul(rh); } const numeric operator/(const numeric & lh, const numeric & rh) { - debugmsg("operator/(numeric,ex)",LOGLEVEL_OPERATOR); return lh.div(rh); } @@ -116,25 +107,21 @@ const numeric operator/(const numeric & lh, const numeric & rh) ex & operator+=(ex & lh, const ex & rh) { - debugmsg("operator+=(ex,ex)",LOGLEVEL_OPERATOR); return lh = exadd(lh, rh); } ex & operator-=(ex & lh, const ex & rh) { - debugmsg("operator-=(ex,ex)",LOGLEVEL_OPERATOR); return lh = exadd(lh, exminus(rh)); } ex & operator*=(ex & lh, const ex & rh) { - debugmsg("operator*=(ex,ex)",LOGLEVEL_OPERATOR); return lh = exmul(lh, rh); } ex & operator/=(ex & lh, const ex & rh) { - debugmsg("operator/=(ex,ex)",LOGLEVEL_OPERATOR); return lh = exmul(lh, power(rh,_ex_1)); } @@ -143,28 +130,24 @@ ex & operator/=(ex & lh, const ex & rh) numeric & operator+=(numeric & lh, const numeric & rh) { - debugmsg("operator+=(numeric,numeric)",LOGLEVEL_OPERATOR); lh = lh.add(rh); return lh; } numeric & operator-=(numeric & lh, const numeric & rh) { - debugmsg("operator-=(numeric,numeric)",LOGLEVEL_OPERATOR); lh = lh.sub(rh); return lh; } numeric & operator*=(numeric & lh, const numeric & rh) { - debugmsg("operator*=(numeric,numeric)",LOGLEVEL_OPERATOR); lh = lh.mul(rh); return lh; } numeric & operator/=(numeric & lh, const numeric & rh) { - debugmsg("operator/=(numeric,numeric)",LOGLEVEL_OPERATOR); lh = lh.div(rh); return lh; } @@ -174,25 +157,21 @@ numeric & operator/=(numeric & lh, const numeric & rh) const ex operator+(const ex & lh) { - debugmsg("operator+(ex)",LOGLEVEL_OPERATOR); return lh; } const ex operator-(const ex & lh) { - debugmsg("operator-(ex)",LOGLEVEL_OPERATOR); return exminus(lh); } const numeric operator+(const numeric & lh) { - debugmsg("operator+(numeric)",LOGLEVEL_OPERATOR); return lh; } const numeric operator-(const numeric & lh) { - debugmsg("operator-(numeric)",LOGLEVEL_OPERATOR); return _num_1.mul(lh); } @@ -202,14 +181,12 @@ const numeric operator-(const numeric & lh) /** Expression prefix increment. Adds 1 and returns incremented ex. */ ex & operator++(ex & rh) { - debugmsg("operator++(ex)",LOGLEVEL_OPERATOR); return rh = exadd(rh, _ex1); } /** Expression prefix decrement. Subtracts 1 and returns decremented ex. */ ex & operator--(ex & rh) { - debugmsg("operator--(ex)",LOGLEVEL_OPERATOR); return rh = exadd(rh, _ex_1); } @@ -217,7 +194,6 @@ ex & operator--(ex & rh) * incremented by 1. */ const ex operator++(ex & lh, int) { - debugmsg("operator++(ex,int)",LOGLEVEL_OPERATOR); ex tmp(lh); lh = exadd(lh, _ex1); return tmp; @@ -227,7 +203,6 @@ const ex operator++(ex & lh, int) * decremented by 1. */ const ex operator--(ex & lh, int) { - debugmsg("operator--(ex,int)",LOGLEVEL_OPERATOR); ex tmp(lh); lh = exadd(lh, _ex_1); return tmp; @@ -236,7 +211,6 @@ const ex operator--(ex & lh, int) /** Numeric prefix increment. Adds 1 and returns incremented number. */ numeric& operator++(numeric & rh) { - debugmsg("operator++(numeric)",LOGLEVEL_OPERATOR); rh = rh.add(_num1); return rh; } @@ -244,7 +218,6 @@ numeric& operator++(numeric & rh) /** Numeric prefix decrement. Subtracts 1 and returns decremented number. */ numeric& operator--(numeric & rh) { - debugmsg("operator--(numeric)",LOGLEVEL_OPERATOR); rh = rh.add(_num_1); return rh; } @@ -253,7 +226,6 @@ numeric& operator--(numeric & rh) * incremented by 1. */ const numeric operator++(numeric & lh, int) { - debugmsg("operator++(numeric,int)",LOGLEVEL_OPERATOR); numeric tmp(lh); lh = lh.add(_num1); return tmp; @@ -263,7 +235,6 @@ const numeric operator++(numeric & lh, int) * decremented by 1. */ const numeric operator--(numeric & lh, int) { - debugmsg("operator--(numeric,int)",LOGLEVEL_OPERATOR); numeric tmp(lh); lh = lh.add(_num_1); return tmp; @@ -273,37 +244,31 @@ const numeric operator--(numeric & lh, int) const relational operator==(const ex & lh, const ex & rh) { - debugmsg("operator==(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::equal); } const relational operator!=(const ex & lh, const ex & rh) { - debugmsg("operator!=(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::not_equal); } const relational operator<(const ex & lh, const ex & rh) { - debugmsg("operator<(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::less); } const relational operator<=(const ex & lh, const ex & rh) { - debugmsg("operator<=(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::less_or_equal); } const relational operator>(const ex & lh, const ex & rh) { - debugmsg("operator>(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::greater); } const relational operator>=(const ex & lh, const ex & rh) { - debugmsg("operator>=(ex,ex)",LOGLEVEL_OPERATOR); return relational(lh,rh,relational::greater_or_equal); } diff --git a/ginac/power.cpp b/ginac/power.cpp index a5db62b7..58913a8b 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -36,7 +36,6 @@ #include "symbol.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" namespace GiNaC { @@ -46,13 +45,10 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(power, basic) typedef std::vector intvector; ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// -power::power() : inherited(TINFO_power) -{ - debugmsg("power default ctor",LOGLEVEL_CONSTRUCT); -} +power::power() : inherited(TINFO_power) { } void power::copy(const power & other) { @@ -75,7 +71,6 @@ DEFAULT_DESTROY(power) power::power(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("power ctor from archive_node", LOGLEVEL_CONSTRUCT); n.find_ex("basis", basis, sym_lst); n.find_ex("exponent", exponent, sym_lst); } @@ -121,8 +116,6 @@ static void print_sym_pow(const print_context & c, const symbol &x, int exp) void power::print(const print_context & c, unsigned level) const { - debugmsg("power print", LOGLEVEL_PRINT); - if (is_a(c)) { inherited::print(c, level); @@ -303,8 +296,6 @@ ex power::coeff(const ex & s, int n) const * @param level cut-off in recursive evaluation */ ex power::eval(int level) const { - debugmsg("power eval",LOGLEVEL_MEMBER_FUNCTION); - if ((level==1) && (flags & status_flags::evaluated)) return *this; else if (level == -max_recursion_level) @@ -478,8 +469,6 @@ ex power::eval(int level) const ex power::evalf(int level) const { - debugmsg("power evalf",LOGLEVEL_MEMBER_FUNCTION); - ex ebasis; ex eexponent; @@ -490,7 +479,7 @@ ex power::evalf(int level) const throw(std::runtime_error("max recursion level reached")); } else { ebasis = basis.evalf(level-1); - if (!is_ex_exactly_of_type(exponent,numeric)) + if (!is_exactly_a(exponent)) eexponent = exponent.evalf(level-1); else eexponent = exponent; diff --git a/ginac/pseries.cpp b/ginac/pseries.cpp index 4cccdd29..50905266 100644 --- a/ginac/pseries.cpp +++ b/ginac/pseries.cpp @@ -34,7 +34,6 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { @@ -45,10 +44,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(pseries, basic) * Default ctor, dtor, copy ctor, assignment operator and helpers */ -pseries::pseries() : basic(TINFO_pseries) -{ - debugmsg("pseries default ctor", LOGLEVEL_CONSTRUCT); -} +pseries::pseries() : inherited(TINFO_pseries) { } void pseries::copy(const pseries &other) { @@ -76,7 +72,6 @@ DEFAULT_DESTROY(pseries) * @return newly constructed pseries */ pseries::pseries(const ex &rel_, const epvector &ops_) : basic(TINFO_pseries), seq(ops_) { - debugmsg("pseries ctor from ex,epvector", LOGLEVEL_CONSTRUCT); GINAC_ASSERT(is_exactly_a(rel_)); GINAC_ASSERT(is_exactly_a(rel_.lhs())); point = rel_.rhs(); @@ -90,7 +85,6 @@ pseries::pseries(const ex &rel_, const epvector &ops_) : basic(TINFO_pseries), s pseries::pseries(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("pseries ctor from archive_node", LOGLEVEL_CONSTRUCT); for (unsigned int i=0; true; ++i) { ex rest; ex coeff; @@ -124,8 +118,6 @@ DEFAULT_UNARCHIVE(pseries) void pseries::print(const print_context & c, unsigned level) const { - debugmsg("pseries print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() diff --git a/ginac/registrar.h b/ginac/registrar.h index 125d0998..f038b8ec 100644 --- a/ginac/registrar.h +++ b/ginac/registrar.h @@ -77,7 +77,7 @@ public: \ GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS(classname, supername) \ public: \ classname(); \ - ~classname() { /*debugmsg(#classname " dtor", LOGLEVEL_DESTRUCT);*/ destroy(false); } \ + ~classname() { destroy(false); } \ classname(const classname & other); \ const classname & operator=(const classname & other); \ basic * duplicate() const; \ @@ -97,14 +97,9 @@ private: * from 'basic' (such as the assignment operator). */ #define GINAC_IMPLEMENT_REGISTERED_CLASS(classname, supername) \ GINAC_IMPLEMENT_REGISTERED_CLASS_NO_CTORS(classname, supername) \ -classname::classname(const classname & other) \ -{ \ - /*debugmsg(#classname " copy ctor", LOGLEVEL_CONSTRUCT);*/ \ - copy(other); \ -} \ +classname::classname(const classname & other) { copy(other); } \ const classname & classname::operator=(const classname & other) \ { \ - /*debugmsg(#classname " operator=", LOGLEVEL_ASSIGNMENT);*/ \ if (this != &other) { \ destroy(true); \ copy(other); \ @@ -112,7 +107,6 @@ const classname & classname::operator=(const classname & other) \ return *this; \ } \ basic * classname::duplicate() const { \ - /*debugmsg(#classname " duplicate", LOGLEVEL_DUPLICATE);*/ \ return new classname(*this); \ } diff --git a/ginac/relational.cpp b/ginac/relational.cpp index 9d50fee2..0b807463 100644 --- a/ginac/relational.cpp +++ b/ginac/relational.cpp @@ -27,20 +27,16 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(relational, basic) ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// -relational::relational() : basic(TINFO_relational) -{ - debugmsg("relational default ctor",LOGLEVEL_CONSTRUCT); -} +relational::relational() : basic(TINFO_relational) {} void relational::copy(const relational & other) { @@ -58,13 +54,7 @@ DEFAULT_DESTROY(relational) // public -relational::relational(const ex & lhs, const ex & rhs, operators oper) : basic(TINFO_relational) -{ - debugmsg("relational ctor ex,ex,operator",LOGLEVEL_CONSTRUCT); - lh=lhs; - rh=rhs; - o=oper; -} +relational::relational(const ex & lhs, const ex & rhs, operators oper) : basic(TINFO_relational), lh(lhs), rh(rhs), o(oper) {} ////////// // archiving @@ -72,7 +62,6 @@ relational::relational(const ex & lhs, const ex & rhs, operators oper) : basic(T relational::relational(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("relational ctor from archive_node", LOGLEVEL_CONSTRUCT); unsigned int opi; if (!(n.find_unsigned("op", opi))) throw (std::runtime_error("unknown relational operator in archive")); @@ -99,8 +88,6 @@ DEFAULT_UNARCHIVE(relational) void relational::print(const print_context & c, unsigned level) const { - debugmsg("relational print",LOGLEVEL_PRINT); - if (is_a(c)) { inherited::print(c, level); diff --git a/ginac/structure.cpp b/ginac/structure.cpp index b094c09c..d2edaf86 100644 --- a/ginac/structure.cpp +++ b/ginac/structure.cpp @@ -24,7 +24,6 @@ #include "structure.h" #include "archive.h" -#include "debugmsg.h" #include "utils.h" #include "print.h" @@ -33,7 +32,7 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(structure, basic) ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// DEFAULT_CTORS(structure) @@ -50,8 +49,6 @@ DEFAULT_ARCHIVING(structure) void structure::print(const print_context & c, unsigned level) const { - debugmsg("structure print",LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() diff --git a/ginac/structure.pl b/ginac/structure.pl index f6b8a489..6c5760f8 100755 --- a/ginac/structure.pl +++ b/ginac/structure.pl @@ -156,7 +156,7 @@ class ${STRUCTURE} : public structure { // member functions - // default ctor, dtor, copy ctor assignment operator and helpers + // default ctor, dtor, copy ctor, assignment operator and helpers public: ${STRUCTURE}(); ~${STRUCTURE}(); @@ -260,25 +260,21 @@ namespace GiNaC { ${STRUCTURE}::${STRUCTURE}() { - debugmsg("${STRUCTURE} default ctor",LOGLEVEL_CONSTRUCT); tinfo_key=tinfo_${STRUCTURE}; } ${STRUCTURE}::~${STRUCTURE}() { - debugmsg("${STRUCTURE} destructor",LOGLEVEL_DESTRUCT); destroy(false); } ${STRUCTURE}::${STRUCTURE}(${STRUCTURE} const & other) { - debugmsg("${STRUCTURE} copy ctor",LOGLEVEL_CONSTRUCT); copy(other); } ${STRUCTURE} const & ${STRUCTURE}::operator=(${STRUCTURE} const & other) { - debugmsg("${STRUCTURE} operator=",LOGLEVEL_ASSIGNMENT); if (this != &other) { destroy(true); copy(other); @@ -308,7 +304,6 @@ void ${STRUCTURE}::destroy(bool call_parent) ${STRUCTURE}::${STRUCTURE}(${constructor_arglist}) : ${constructor_statements} { - debugmsg("${STRUCTURE} ctor from children", LOGLEVEL_CONSTRUCT); tinfo_key=tinfo_${STRUCTURE}; } @@ -320,13 +315,11 @@ ${STRUCTURE}::${STRUCTURE}(${constructor_arglist}) basic * ${STRUCTURE}::duplicate() const { - debugmsg("${STRUCTURE} duplicate",LOGLEVEL_DUPLICATE); return new ${STRUCTURE}(*this); } void ${STRUCTURE}::print(const print_context & c, unsigned level) const { - debugmsg("${STRUCTURE} print", LOGLEVEL_PRINT); c.s << class_name() << "()"; } diff --git a/ginac/symbol.cpp b/ginac/symbol.cpp index 65386f3a..5d2ac8ce 100644 --- a/ginac/symbol.cpp +++ b/ginac/symbol.cpp @@ -27,7 +27,6 @@ #include "lst.h" #include "print.h" #include "archive.h" -#include "debugmsg.h" #include "tostring.h" #include "utils.h" @@ -36,12 +35,11 @@ namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS_NO_CTORS(symbol, basic) ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// symbol::symbol() : inherited(TINFO_symbol), serial(next_serial++) { - debugmsg("symbol default ctor", LOGLEVEL_CONSTRUCT); name = TeX_name = autoname_prefix()+ToString(serial); asexinfop = new assigned_ex_info; setflag(status_flags::evaluated | status_flags::expanded); @@ -74,13 +72,11 @@ void symbol::destroy(bool call_parent) symbol::symbol(const symbol & other) { - debugmsg("symbol copy ctor", LOGLEVEL_CONSTRUCT); copy(other); } symbol::symbol(const std::string & initname) : inherited(TINFO_symbol) { - debugmsg("symbol ctor from string", LOGLEVEL_CONSTRUCT); name = initname; TeX_name = default_TeX_name(); serial = next_serial++; @@ -90,7 +86,6 @@ symbol::symbol(const std::string & initname) : inherited(TINFO_symbol) symbol::symbol(const std::string & initname, const std::string & texname) : inherited(TINFO_symbol) { - debugmsg("symbol ctor from string", LOGLEVEL_CONSTRUCT); name = initname; TeX_name = texname; serial = next_serial++; @@ -105,7 +100,6 @@ symbol::symbol(const std::string & initname, const std::string & texname) : inhe /** Construct object from archive_node. */ symbol::symbol(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("symbol ctor from archive_node", LOGLEVEL_CONSTRUCT); serial = next_serial++; if (!(n.find_string("name", name))) name = autoname_prefix() + ToString(serial); @@ -145,14 +139,11 @@ void symbol::archive(archive_node &n) const basic *symbol::duplicate() const { - debugmsg("symbol duplicate", LOGLEVEL_DUPLICATE); return new symbol(*this); } void symbol::print(const print_context & c, unsigned level) const { - debugmsg("symbol print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << name << " (" << class_name() << ")" diff --git a/ginac/symbol.h b/ginac/symbol.h index fb4b99e1..b4d31f6f 100644 --- a/ginac/symbol.h +++ b/ginac/symbol.h @@ -52,14 +52,10 @@ class symbol : public basic // member functions - // default ctor, dtor, copy ctor assignment operator and helpers + // default ctor, dtor, copy ctor, assignment operator and helpers public: symbol(); - ~symbol() - { - /*debugmsg("symbol dtor", LOGLEVEL_DESTRUCT);*/ - destroy(false); - } + ~symbol() { destroy(false); } symbol(const symbol & other); protected: void copy(const symbol & other); diff --git a/ginac/symmetry.cpp b/ginac/symmetry.cpp index e0f1ba3e..1deb1cfa 100644 --- a/ginac/symmetry.cpp +++ b/ginac/symmetry.cpp @@ -30,7 +30,6 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { @@ -51,12 +50,11 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(symmetry, basic) */ ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// symmetry::symmetry() : type(none) { - debugmsg("symmetry default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_symmetry; } @@ -76,14 +74,12 @@ DEFAULT_DESTROY(symmetry) symmetry::symmetry(unsigned i) : type(none) { - debugmsg("symmetry constructor from unsigned", LOGLEVEL_CONSTRUCT); indices.insert(i); tinfo_key = TINFO_symmetry; } symmetry::symmetry(symmetry_type t, const symmetry &c1, const symmetry &c2) : type(t) { - debugmsg("symmetry constructor from symmetry_type,symmetry &,symmetry &", LOGLEVEL_CONSTRUCT); add(c1); add(c2); tinfo_key = TINFO_symmetry; } @@ -95,8 +91,6 @@ symmetry::symmetry(symmetry_type t, const symmetry &c1, const symmetry &c2) : ty /** Construct object from archive_node. */ symmetry::symmetry(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("symmetry ctor from archive_node", LOGLEVEL_CONSTRUCT); - unsigned t; if (!(n.find_unsigned("type", t))) throw (std::runtime_error("unknown symmetry type in archive")); @@ -163,8 +157,6 @@ int symmetry::compare_same_type(const basic & other) const void symmetry::print(const print_context & c, unsigned level) const { - debugmsg("symmetry print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() diff --git a/ginac/tensor.cpp b/ginac/tensor.cpp index f6379bd0..7ab2ef91 100644 --- a/ginac/tensor.cpp +++ b/ginac/tensor.cpp @@ -34,7 +34,6 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { @@ -46,14 +45,9 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(spinmetric, tensmetric) GINAC_IMPLEMENT_REGISTERED_CLASS(tensepsilon, tensor) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// -tensor::tensor(unsigned ti) : inherited(ti) -{ - debugmsg("tensor constructor from unsigned", LOGLEVEL_CONSTRUCT); \ -} - DEFAULT_CTORS(tensor) DEFAULT_CTORS(tensdelta) DEFAULT_CTORS(tensmetric) @@ -64,19 +58,16 @@ DEFAULT_DESTROY(tensepsilon) minkmetric::minkmetric() : pos_sig(false) { - debugmsg("minkmetric default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_minkmetric; } spinmetric::spinmetric() { - debugmsg("spinmetric default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_spinmetric; } minkmetric::minkmetric(bool ps) : pos_sig(ps) { - debugmsg("minkmetric constructor from bool", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_minkmetric; } @@ -88,13 +79,11 @@ void minkmetric::copy(const minkmetric & other) tensepsilon::tensepsilon() : minkowski(false), pos_sig(false) { - debugmsg("tensepsilon default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_tensepsilon; } tensepsilon::tensepsilon(bool mink, bool ps) : minkowski(mink), pos_sig(ps) { - debugmsg("tensepsilon constructor from bool,bool", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_tensepsilon; } @@ -118,7 +107,6 @@ DEFAULT_UNARCHIVE(tensepsilon) minkmetric::minkmetric(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("minkmetric constructor from archive_node", LOGLEVEL_CONSTRUCT); n.find_bool("pos_sig", pos_sig); } @@ -130,7 +118,6 @@ void minkmetric::archive(archive_node &n) const tensepsilon::tensepsilon(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("tensepsilon constructor from archive_node", LOGLEVEL_CONSTRUCT); n.find_bool("minkowski", minkowski); n.find_bool("pos_sig", pos_sig); } diff --git a/ginac/tensor.h b/ginac/tensor.h index d3b27b60..02496ad9 100644 --- a/ginac/tensor.h +++ b/ginac/tensor.h @@ -37,7 +37,7 @@ class tensor : public basic // other constructors protected: - tensor(unsigned ti); + tensor(unsigned ti) : inherited(ti) {} // functions overriding virtual functions from base classes protected: diff --git a/ginac/utils.cpp b/ginac/utils.cpp index 31aaa5a7..f05bb1d4 100644 --- a/ginac/utils.cpp +++ b/ginac/utils.cpp @@ -384,7 +384,7 @@ library_init::~library_init() // member functions - // default ctor, dtor, copy ctor assignment operator and helpers + // default ctor, dtor, copy ctor, assignment operator and helpers // none // other ctors @@ -408,7 +408,7 @@ library_init::~library_init() ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// // public diff --git a/ginac/utils.h b/ginac/utils.h index bfd21c53..16ec7232 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -472,10 +472,7 @@ void classname::destroy(bool call_parent) \ } #define DEFAULT_CTORS(classname) \ -classname::classname() : inherited(TINFO_##classname) \ -{ \ - debugmsg(#classname " default constructor", LOGLEVEL_CONSTRUCT); \ -} \ +classname::classname() : inherited(TINFO_##classname) {} \ DEFAULT_COPY(classname) \ DEFAULT_DESTROY(classname) @@ -486,10 +483,7 @@ ex classname::unarchive(const archive_node &n, const lst &sym_lst) \ } #define DEFAULT_ARCHIVING(classname) \ -classname::classname(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) \ -{ \ - debugmsg(#classname " constructor from archive_node", LOGLEVEL_CONSTRUCT); \ -} \ +classname::classname(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) {} \ DEFAULT_UNARCHIVE(classname) \ void classname::archive(archive_node &n) const \ { \ @@ -506,7 +500,6 @@ int classname::compare_same_type(const basic & other) const \ #define DEFAULT_PRINT(classname, text) \ void classname::print(const print_context & c, unsigned level) const \ { \ - debugmsg(#classname " print", LOGLEVEL_PRINT); \ if (is_a(c)) \ inherited::print(c, level); \ else \ @@ -516,7 +509,6 @@ void classname::print(const print_context & c, unsigned level) const \ #define DEFAULT_PRINT_LATEX(classname, text, latex) \ void classname::print(const print_context & c, unsigned level) const \ { \ - debugmsg(#classname " print", LOGLEVEL_PRINT); \ if (is_a(c)) \ inherited::print(c, level); \ else if (is_a(c)) \ diff --git a/ginac/wildcard.cpp b/ginac/wildcard.cpp index f203c5f0..c653d830 100644 --- a/ginac/wildcard.cpp +++ b/ginac/wildcard.cpp @@ -24,19 +24,17 @@ #include "print.h" #include "archive.h" #include "utils.h" -#include "debugmsg.h" namespace GiNaC { GINAC_IMPLEMENT_REGISTERED_CLASS(wildcard, basic) ////////// -// default constructor, destructor, copy constructor assignment operator and helpers +// default ctor, dtor, copy ctor, assignment operator and helpers ////////// wildcard::wildcard() : label(0) { - debugmsg("wildcard default constructor", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_wildcard; } @@ -54,7 +52,6 @@ DEFAULT_DESTROY(wildcard) wildcard::wildcard(unsigned l) : label(l) { - debugmsg("wildcard constructor from unsigned", LOGLEVEL_CONSTRUCT); tinfo_key = TINFO_wildcard; } @@ -64,7 +61,6 @@ wildcard::wildcard(unsigned l) : label(l) wildcard::wildcard(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) { - debugmsg("wildcard constructor from archive_node", LOGLEVEL_CONSTRUCT); n.find_unsigned("label", label); } @@ -93,8 +89,6 @@ int wildcard::compare_same_type(const basic & other) const void wildcard::print(const print_context & c, unsigned level) const { - debugmsg("wildcard print", LOGLEVEL_PRINT); - if (is_a(c)) { c.s << std::string(level, ' ') << class_name() << " (" << label << ")" << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec -- 2.44.0