]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.cpp
some more comments and cleanups to mul::expand() and ncmul::expand()
[ginac.git] / ginac / add.cpp
index c4e53360b1ed665dd9f7047bc7c63ba178697f1b..7764d3683fb5e97a0ccb618b71fcfe9aa7ea2cd3 100644 (file)
@@ -151,7 +151,7 @@ void add::print(const print_context & c, unsigned level) const
                        }
                
                        // Separator is "+", except if the following expression would have a leading minus sign
-                       it++;
+                       ++it;
                        if (it != itend && !(it->coeff.compare(_num0()) < 0 || (it->coeff.compare(_num1()) == 0 && is_exactly_a<numeric>(it->rest) && it->rest.compare(_num0()) < 0)))
                                c.s << "+";
                }
@@ -215,7 +215,7 @@ void add::print(const print_context & c, unsigned level) const
                                        c.s << '*';
                        }
                        it->rest.print(c, precedence());
-                       it++;
+                       ++it;
                }
 
                if (precedence() <= level) {
@@ -511,9 +511,6 @@ ex add::recombine_pair_to_ex(const expair & p) const
 
 ex add::expand(unsigned options) const
 {
-       if (options == 0 && (flags & status_flags::expanded))
-               return *this;
-       
        epvector *vp = expandchildren(options);
        if (vp == NULL) {
                // the terms have not changed, so it is safe to declare this expanded