]> git.lyx.org Git - features.git/commitdiff
Constify some variables in tex2lyx
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 26 Oct 2011 14:04:22 +0000 (14:04 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 26 Oct 2011 14:04:22 +0000 (14:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40013 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/text.cpp

index 7ca373d9cd2d323e5a54ff68b1ac3a7f0c850eaf..7a5565e25b72cf547cd6d7f08710be1116776a01 100644 (file)
@@ -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");