]> www.ginac.de Git - ginac.git/blobdiff - ginac/polynomial/collect_vargs.cpp
[BUGFIX] Fix crash in parser.
[ginac.git] / ginac / polynomial / collect_vargs.cpp
index 835869743e51b43470859b8984b3c77230974a1a..1200563722fd89c4db64ae95609ac9885c31cf32 100644 (file)
@@ -3,7 +3,7 @@
  *  Utility functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2016 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 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
@@ -118,7 +118,7 @@ collect_term(ex_collect_priv_t& ec, const ex& e, const exvector& vars)
                key[i] = var_i_pow;
                pre_coeff = pre_coeff.coeff(vars[i], var_i_pow);
        }
-       ex_collect_priv_t::iterator i = ec.find(key);
+       auto i = ec.find(key);
        if (i != ec.end())
                i->second += pre_coeff;
        else
@@ -127,9 +127,9 @@ collect_term(ex_collect_priv_t& ec, const ex& e, const exvector& vars)
 
 static void wipe_out_zeros(ex_collect_priv_t& m)
 {
-       ex_collect_priv_t::iterator i = m.begin();
+       auto i = m.begin();
        while (i != m.end()) {
-               // be careful to not invalide iterator, use post-increment
+               // be careful to not invalidate the iterator, use post-increment
                // for that, see e.g.
                // http://coding.derkeiler.com/Archive/C_CPP/comp.lang.cpp/2004-02/0502.html
                if (i->second.is_zero())