]> www.ginac.de Git - ginac.git/blobdiff - ginac/idx.cpp
Use C++11 'auto' and range-based for loops where possible.
[ginac.git] / ginac / idx.cpp
index 601c339b9fb745e203073426fb0742bf1164e7c0..e28402d21f0e3c7103ff3ee48dbbf0bcf965173b 100644 (file)
@@ -373,7 +373,7 @@ ex idx::evalf() const
 ex idx::subs(const exmap & m, unsigned options) const
 {
        // First look for index substitutions
-       exmap::const_iterator it = m.find(*this);
+       auto it = m.find(*this);
        if (it != m.end()) {
 
                // Substitution index->index
@@ -541,7 +541,7 @@ void find_free_and_dummy(exvector::const_iterator it, exvector::const_iterator i
 
        // Find dummy pairs and free indices
        it = v.begin(); itend = v.end();
-       exvector::const_iterator last = it++;
+       auto last = it++;
        while (it != itend) {
                if (is_dummy_pair(*it, *last)) {
                        out_dummy.push_back(*last);