X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Futils.h;h=c2a5f232336f3576ee9d72f75bd5b6e2f2c18f2e;hp=6e1d3ae8a55caa31987db800a2da7180fe712bba;hb=06eb6b761f4b9d9eed4decd8ed50d94b40b94a0e;hpb=336c03561cdacb388041cf9345c51a28465ee653 diff --git a/ginac/utils.h b/ginac/utils.h index 6e1d3ae8..c2a5f232 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -292,10 +292,13 @@ int classname::compare_same_type(const basic & other) const \ } #define DEFAULT_PRINT(classname, text) \ -void classname::print(std::ostream & os, unsigned upper_precedence) const \ +void classname::print(const print_context & c, unsigned level) const \ { \ debugmsg(#classname " print", LOGLEVEL_PRINT); \ - os << text; \ + if (is_of_type(c, print_tree)) \ + inherited::print(c, level); \ + else \ + c.s << text; \ } } // namespace GiNaC