]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.cpp
fixed a bug where quo() would call vector::reserve() with a negative argument
[ginac.git] / ginac / structure.cpp
index e1ea6d56577349461171b03969942affcb68c5cd..1122c212e730b0430ab06e82e476e3ef192f2b4e 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <iostream>
 #include <string>
 
 #include "structure.h"
 #include "archive.h"
-#include "debugmsg.h"
 #include "utils.h"
 #include "print.h"
 
@@ -33,7 +33,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,9 +50,7 @@ DEFAULT_ARCHIVING(structure)
 
 void structure::print(const print_context & c, unsigned level) const
 {
-       debugmsg("structure print",LOGLEVEL_PRINT);
-
-       if (is_of_type(c, print_tree)) {
+       if (is_a<print_tree>(c)) {
 
                c.s << std::string(level, ' ') << class_name()
                    << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec
@@ -68,7 +66,7 @@ DEFAULT_COMPARE(structure)
 
 bool structure::is_equal_same_type(const basic & other) const
 {
-       GINAC_ASSERT(is_of_type(other, structure));
+       GINAC_ASSERT(is_a<structure>(other));
        return true; // all structures are the same
 }