diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index f1bb0227f..85942488a 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -2655,7 +2655,7 @@ std::string Preprocessor::expandMacros(const std::string &code, std::string file // * when pos goes beyond a limit the limit needs to be // deleted because it is unsafe to insert/delete text // after the limit otherwise - std::map limits; + std::map limits; // pos is the current position in line std::string::size_type pos = 0; @@ -2717,7 +2717,7 @@ std::string Preprocessor::expandMacros(const std::string &code, std::string file // check that pos is within allowed limits for this // macro { - const std::map::const_iterator it2 = limits.find(macro); + const std::map::const_iterator it2 = limits.find(macro); if (it2 != limits.end() && pos <= line.length() - it2->second) break; } @@ -2777,7 +2777,7 @@ std::string Preprocessor::expandMacros(const std::string &code, std::string file ++pos2; // Remove old limits - for (std::map::iterator iter = limits.begin(); + for (std::map::iterator iter = limits.begin(); iter != limits.end();) { if ((line.length() - pos1) < iter->second) { // We have gone past this limit, so just delete it