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 6e068af..0287dd7 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 5d6fe3a..242395b 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 ebe5d07..1fa24e2 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 a6f3ca9..2c6e5bb 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 19dd2bd..fe63a08 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 a00bff1..005cc16 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 27f7b33..87acde4 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 469acde..7d303fa 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