From aace6055648ffd1c66fb39abc4cd43d615ca3155 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 16 Jun 2008 18:52:54 +0000 Subject: [PATCH] Avoid 11 from_ascii calls git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25282 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathNest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 747f0ca157..cabb21ab36 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -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) -- 2.39.5