]> www.ginac.de Git - ginac.git/blobdiff - ginac/ncmul.cpp
Add support for Texinfo-5.0.
[ginac.git] / ginac / ncmul.cpp
index f21f857266c44fb8731236706d885bbe3725f07f..a00a8de3dd97314ad842a4858a36c478e30be630 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's non-commutative products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -339,15 +339,15 @@ ex ncmul::eval(int level) const
        if (assocseq.empty()) return _ex1;
 
        // determine return types
-       unsignedvector rettypes;
-       rettypes.reserve(assocseq.size());
+       unsignedvector rettypes(assocseq.size());
        size_t i = 0;
        size_t count_commutative=0;
        size_t count_noncommutative=0;
        size_t count_noncommutative_composite=0;
        cit = assocseq.begin(); citend = assocseq.end();
        while (cit != citend) {
-               switch (rettypes[i] = cit->return_type()) {
+               rettypes[i] = cit->return_type();
+               switch (rettypes[i]) {
                case return_types::commutative:
                        count_commutative++;
                        break;