From: Richard Heck Date: Thu, 21 Oct 2010 18:01:06 +0000 (+0000) Subject: Make this a switch. X-Git-Tag: 2.0.0~2309 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5aba6f4fabdf43e38a42a22bfd2b66ee5a3824ef;p=lyx.git Make this a switch. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35758 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 0f4b82aaf8..d3dccdd406 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -370,7 +370,8 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, ParamInfo::ParamHandling handling) const { docstring result; - if (handling == ParamInfo::HANDLING_LATEXIFY) { + switch (handling) { + case ParamInfo::HANDLING_LATEXIFY: { docstring uncodable; for (size_t n = 0; n < command.size(); ++n) { try { @@ -402,10 +403,15 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, "representable in the current encoding and therefore have been omitted:\n%2$s."), from_utf8(insetType()), uncodable)); } - } else if (handling == ParamInfo::HANDLING_ESCAPE) + break; + } + case ParamInfo::HANDLING_ESCAPE: result = escape(command); - else + break; + case ParamInfo::HANDLING_NONE: result = command; + break; + } // switch return result; }