diff --git a/src/lyxtextclass.C b/src/lyxtextclass.C index 3e2365c60a..debb6b819a 100644 --- a/src/lyxtextclass.C +++ b/src/lyxtextclass.C @@ -39,7 +39,6 @@ struct compare_name { bool operator()(boost::shared_ptr const & c) { - //lyxerr << "comparing '" << name_ << "' to '" << c->name() << "'\n"; return c->name() == name_; } @@ -166,6 +165,7 @@ bool LyXTextClass::Read(string const & filename, bool merge) // parsing while (lexrc.isOK() && !error) { int le = lexrc.lex(); + switch (le) { case LyXLex::LEX_FEOF: continue; @@ -174,9 +174,13 @@ bool LyXTextClass::Read(string const & filename, bool merge) lexrc.printError("Unknown TextClass tag `$$Token'"); error = true; continue; - default: break; + + default: + break; } + switch (static_cast(le)) { + case TC_OUTPUTTYPE: // output type definition readOutputType(lexrc); break; @@ -479,13 +483,16 @@ void LyXTextClass::readMaxCounter(LyXLex & lexrc) }; pushpophelper pph(lexrc, maxCounterTags, MC_COUNTER_ENUMIV); + int le = lexrc.lex(); switch (le) { case LyXLex::LEX_UNDEF: lexrc.printError("Unknown MaxCounter tag `$$Token'"); return; - default: break; + default: + break; } + switch (static_cast(le)) { case MC_COUNTER_CHAPTER: maxcounter_ = LABEL_COUNTER_CHAPTER;