From: Christian Bauer Date: Wed, 6 Aug 2003 18:43:18 +0000 (+0000) Subject: print_tree: only print the "nops=" line when nops() > 0 X-Git-Tag: release_1-0-15~4 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=df27e9de2a3f09aa315d1fe9fb90a3e5a5751989 print_tree: only print the "nops=" line when nops() > 0 --- diff --git a/ginac/basic.cpp b/ginac/basic.cpp index 483844c0..09d9b79b 100644 --- a/ginac/basic.cpp +++ b/ginac/basic.cpp @@ -185,9 +185,10 @@ void basic::do_print(const print_context & c, unsigned level) const void basic::do_print_tree(const print_tree & c, unsigned level) const { c.s << std::string(level, ' ') << class_name() - << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec - << ", nops=" << nops() - << std::endl; + << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec; + if (nops()) + c.s << ", nops=" << nops(); + c.s << std::endl; for (size_t i=0; i