]> www.ginac.de Git - ginac.git/blobdiff - ginac/container.h
Synced to HEAD
[ginac.git] / ginac / container.h
index 5d6fe3ac5ebb3e9a79b4728ba75345e5005d7eb2..a3fc3989e19da130926dd943c75647148c1bc4ce 100644 (file)
@@ -187,7 +187,7 @@ public:
        }
 
        container(const ex & p1, const ex & p2, const ex & p3,
-                          const ex & p4) : inherited(get_tinfo())
+                 const ex & p4) : inherited(get_tinfo())
        {
                setflag(get_default_flags());
                reserve(this->seq, 4);
@@ -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
@@ -501,7 +502,7 @@ void container<C>::do_print(const print_context & c, unsigned level) const
 template <template <class> class C>
 void container<C>::do_print_tree(const print_tree & c, unsigned level) const
 {
-       c.s << std::string(level, ' ') << class_name()
+       c.s << std::string(level, ' ') << class_name() << " @" << this
            << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec
            << ", nops=" << nops()
            << std::endl;
@@ -660,7 +661,7 @@ container<C> & container<C>::sort()
 }
 
 /** Specialization of container::unique_() for std::list. */
-inline void container<std::list>::unique_()
+template<> inline void container<std::list>::unique_()
 {
        this->seq.unique(ex_is_equal());
 }
@@ -723,8 +724,8 @@ template <template <class> class C>
 std::auto_ptr<typename container<C>::STLT> container<C>::subschildren(const exmap & m, unsigned options) const
 {
        // returns a NULL pointer if nothing had to be substituted
-       // returns a pointer to a newly created epvector otherwise
-       // (and relinquishes responsibility for the epvector)
+       // returns a pointer to a newly created STLT otherwise
+       // (and relinquishes responsibility for the STLT)
 
        const_iterator cit = this->seq.begin(), end = this->seq.end();
        while (cit != end) {