diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index bdc31b3cf2..3200845475 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1513,7 +1513,9 @@ void parse_environment(Parser & p, ostream & os, bool outer, if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); set const & req = newlayout->requires(); - for (set::const_iterator it = req.begin(); it != req.end(); ++it) + set::const_iterator it = req.begin(); + set::const_iterator en = req.end(); + for (; it != en; ++it) preamble.registerAutomaticallyLoadedPackage(*it); } @@ -2428,8 +2430,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, if (!preamble.titleLayoutFound()) preamble.titleLayoutFound(newlayout->intitle); set const & req = newlayout->requires(); - for (set::const_iterator it = req.begin(); - it != req.end(); ++it) + set::const_iterator it = req.begin(); + set::const_iterator en = req.end(); + for (; it != en; ++it) preamble.registerAutomaticallyLoadedPackage(*it); } else handle_ert(os,