From: Richard Heck Date: Sat, 15 Aug 2009 16:50:44 +0000 (+0000) Subject: Little bit of cleanup. X-Git-Tag: 2.0.0~5715 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e445666594185940b4e340a782b2b07aae4c276c;p=features.git Little bit of cleanup. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31058 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/LayoutFile.cpp b/src/LayoutFile.cpp index b7abd795d0..05fc109941 100644 --- a/src/LayoutFile.cpp +++ b/src/LayoutFile.cpp @@ -136,27 +136,27 @@ bool LayoutFileList::read() default: string const fname = lex.getString(); LYXERR(Debug::TCLASS, "Fname: " << fname); - if (lex.next()) { - string const clname = lex.getString(); - LYXERR(Debug::TCLASS, "Clname: " << clname); - if (lex.next()) { - string const desc = lex.getString(); - LYXERR(Debug::TCLASS, "Desc: " << desc); - if (lex.next()) { - bool avail = lex.getBool(); - LYXERR(Debug::TCLASS, "Avail: " << avail); - // This code is run when we have - // fname, clname, desc, and avail - LayoutFile * tmpl = new LayoutFile(fname, clname, desc, avail); - if (lyxerr.debugging(Debug::TCLASS)) { - // only system layout files are loaded here so no - // buffer path is needed. - tmpl->load(); - } - classmap_[fname] = tmpl; - } - } + if (!lex.next()) + break; + string const clname = lex.getString(); + LYXERR(Debug::TCLASS, "Clname: " << clname); + if (!lex.next()) + break; + string const desc = lex.getString(); + LYXERR(Debug::TCLASS, "Desc: " << desc); + if (!lex.next()) + break; + bool avail = lex.getBool(); + LYXERR(Debug::TCLASS, "Avail: " << avail); + // This code is run when we have + // fname, clname, desc, and avail + LayoutFile * tmpl = new LayoutFile(fname, clname, desc, avail); + if (lyxerr.debugging(Debug::TCLASS)) { + // only system layout files are loaded here so no + // buffer path is needed. + tmpl->load(); } + classmap_[fname] = tmpl; } } LYXERR(Debug::TCLASS, "End of parsing of textclass.lst");