]> git.lyx.org Git - features.git/commitdiff
Avoid 11 from_ascii calls
authorEnrico Forestieri <forenr@lyx.org>
Mon, 16 Jun 2008 18:52:54 +0000 (18:52 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 16 Jun 2008 18:52:54 +0000 (18:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25282 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathNest.cpp

index 747f0ca1570cf6f588ea3689a5aec3d2c8a464cb..cabb21ab3601aa10174eeb49686c579dcf67e77c 100644 (file)
@@ -73,7 +73,7 @@ using cap::cutSelection;
 using cap::replaceSelection;
 using cap::selClearOrDel;
 
-char const * text_commands[] =
+string const text_commands[] =
 { "text", "textrm", "textsf", "texttt", "textmd", "textbf", "textup", "textit",
   "textsl", "textsc", "textnormal" };
 int const num_text_commands = sizeof(text_commands) / sizeof(*text_commands);
@@ -342,14 +342,14 @@ MathData InsetMathNest::glue() const
 void InsetMathNest::write(WriteStream & os) const
 {
        bool textmode = os.textMode();
-       docstring const latex_name = name().c_str();
+       string const latex_name = to_ascii(name());
        for (int i = 0; i < num_text_commands; ++i) {
-               if (latex_name == from_ascii(text_commands[i])) {
+               if (latex_name == text_commands[i]) {
                        os.textMode(true);
                        break;
                }
        }
-       os << '\\' << latex_name;
+       os << '\\' << latex_name.c_str();
        for (size_t i = 0; i < nargs(); ++i)
                os << '{' << cell(i) << '}';
        if (nargs() == 0)