fixes for gcc 3.4
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 15 Mar 2004 20:14:33 +0000 (20:14 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 15 Mar 2004 20:14:33 +0000 (20:14 +0000)
ginac/add.cpp
ginac/container.h
ginac/fail.cpp
ginac/matrix.cpp
ginac/mul.cpp
ginac/ncmul.cpp
ginac/relational.cpp
ginac/structure.h

index 6e068af8dcbaaac8a2aa8224bbc47a6ca563ef85..0287dd7a886446e6d13932a938a44e07144e24af 100644 (file)
@@ -36,7 +36,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(add, expairseq,
   print_func<print_context>(&add::do_print).
   print_func<print_latex>(&add::do_print_latex).
   print_func<print_csrc>(&add::do_print_csrc).
-  print_func<print_tree>(&inherited::do_print_tree).
+  print_func<print_tree>(&add::do_print_tree).
   print_func<print_python_repr>(&add::do_print_python_repr))
 
 //////////
index 5d6fe3ac5ebb3e9a79b4728ba75345e5005d7eb2..242395b62c2e2d215b09c325ca1bb93e76e63d6c 100644 (file)
@@ -369,8 +369,8 @@ public:
 protected:
        ex conjugate() const
        {
-               STLT* newcont = 0;
-               for (const_iterator i=seq.begin(); i!=seq.end(); ++i) {
+               STLT *newcont = NULL;
+               for (const_iterator i=this->seq.begin(); i!=this->seq.end(); ++i) {
                        if (newcont) {
                                newcont->push_back(i->conjugate());
                                continue;
@@ -380,8 +380,8 @@ protected:
                                continue;
                        }
                        newcont = new STLT;
-                       reserve (*newcont, seq.size());
-                       for (const_iterator j=seq.begin(); j!=i; ++j) {
+                       reserve(*newcont, this->seq.size());
+                       for (const_iterator j=this->seq.begin(); j!=i; ++j) {
                                newcont->push_back(*j);
                        }
                        newcont->push_back(x);
@@ -393,6 +393,7 @@ protected:
                }
                return *this;
        }
+
        bool is_equal_same_type(const basic & other) const;
 
        // new virtual functions which can be overridden by derived classes
index ebe5d07705484595b873f99aebad5d915e248602..1fa24e29a88a1d9094af3ccc98f65bcea76ca378 100644 (file)
@@ -31,7 +31,7 @@ namespace GiNaC {
 
 GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(fail, basic,
   print_func<print_context>(&fail::do_print).
-  print_func<print_tree>(&basic::do_print_tree))
+  print_func<print_tree>(&fail::do_print_tree))
 
 //////////
 // default constructor
index a6f3ca9268135c73fa51e186b234b36cb05459fd..2c6e5bb4406f9559f36462c9df3038543e8be1e3 100644 (file)
@@ -45,7 +45,7 @@ namespace GiNaC {
 GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(matrix, basic,
   print_func<print_context>(&matrix::do_print).
   print_func<print_latex>(&matrix::do_print_latex).
-  print_func<print_tree>(&basic::do_print_tree).
+  print_func<print_tree>(&matrix::do_print_tree).
   print_func<print_python_repr>(&matrix::do_print_python_repr))
 
 //////////
index 19dd2bdf406a8daa4e2b6689f6e0fcc7479a2df6..fe63a08861f594b3ca79f6e421879a6d235c137a 100644 (file)
@@ -40,7 +40,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(mul, expairseq,
   print_func<print_context>(&mul::do_print).
   print_func<print_latex>(&mul::do_print_latex).
   print_func<print_csrc>(&mul::do_print_csrc).
-  print_func<print_tree>(&inherited::do_print_tree).
+  print_func<print_tree>(&mul::do_print_tree).
   print_func<print_python_repr>(&mul::do_print_python_repr))
 
 
index a00bff1e385f2016228f4dd850ce55757a93263f..005cc16f77369b29d67c9a93550a473d2ce4b566 100644 (file)
@@ -36,7 +36,7 @@ namespace GiNaC {
 
 GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(ncmul, exprseq,
   print_func<print_context>(&ncmul::do_print).
-  print_func<print_tree>(&basic::do_print_tree).
+  print_func<print_tree>(&ncmul::do_print_tree).
   print_func<print_csrc>(&ncmul::do_print_csrc).
   print_func<print_python_repr>(&ncmul::do_print_csrc))
 
index 27f7b33b8372e178b3ee8144d5c348fdcf3d8305..87acde42fe24b89e975167da4dd243716d411fe3 100644 (file)
@@ -33,7 +33,7 @@ namespace GiNaC {
 
 GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(relational, basic,
   print_func<print_context>(&relational::do_print).
-  print_func<print_tree>(&basic::do_print_tree).
+  print_func<print_tree>(&relational::do_print_tree).
   print_func<print_python_repr>(&relational::do_print_python_repr))
 
 //////////
index 469acdecd998eb38c51c84c79576cf76e6789785..7d303fa8bb91465dcab179ad997d21c09739f2d8 100644 (file)
@@ -195,7 +195,7 @@ public:
        // indexed objects
        exvector get_free_indices() const { return exvector(); }
        ex add_indexed(const ex & self, const ex & other) const { return self + other; }
-       ex scalar_mul_indexed(const ex & self, const numeric & other) const { return self * other; }
+       ex scalar_mul_indexed(const ex & self, const numeric & other) const { return self * ex(other); }
        bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const { return false; }
 
        // noncommutativity