Author: uwestoehr
Date: Thu Oct 27 14:43:07 2011
New Revision: 40032
URL: http://www.lyx.org/trac/changeset/40032

Log:
backporting tex2lyx: some simplifications

Modified:
   lyx-devel/branches/BRANCH_2_0_X/src/tex2lyx/text.cpp

Modified: lyx-devel/branches/BRANCH_2_0_X/src/tex2lyx/text.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/tex2lyx/text.cpp        Thu Oct 27 
14:35:02 2011        (r40031)
+++ lyx-devel/branches/BRANCH_2_0_X/src/tex2lyx/text.cpp        Thu Oct 27 
14:43:07 2011        (r40032)
@@ -2482,14 +2482,9 @@
                }
 
                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");
                        if (!offset.empty())

Reply via email to