From c1e3d795f62e88b6c5dda52fafba1404972fe8cc Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 28 May 2012 18:21:22 -0400 Subject: [PATCH] A few more small optimizations noted along the way. --- src/tex2lyx/text.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 24694d3da2..46d4d678b4 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -461,7 +461,9 @@ docstring convert_unicodesymbols(docstring s) set req; docstring parsed = encodings.fromLaTeXCommand(s, Encodings::TEXT_CMD, termination, rem, &req); - 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); os << parsed; s = rem; @@ -1556,7 +1558,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); } @@ -2486,8 +2490,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,