From: Vincent van Ravesteijn Date: Wed, 26 Oct 2011 14:04:22 +0000 (+0000) Subject: Constify some variables in tex2lyx X-Git-Tag: 2.1.0beta1~2474 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=042d0118ae33f8c4abac3333f95bab8ca131432e;p=features.git Constify some variables in tex2lyx git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40013 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 7ca373d9cd..7a5565e25b 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -2531,13 +2531,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, } else if (t.cs() == "rule") { - string offset = ""; - string width; - string thickness; - if (p.hasOpt()) - offset = p.getArg('[', ']'); - width = p.getArg('{', '}'); - thickness = p.getArg('{', '}'); + string const offset = (p.hasOpt() ? p.getArg('[', ']') : string()); + string const width = p.getArg('{', '}'); + string const thickness = p.getArg('{', '}'); context.check_layout(os); begin_command_inset(os, "line", "rule");