diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 85d0be52b8..d567548787 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -337,7 +337,7 @@ MathData InsetMathNest::glue() const void InsetMathNest::write(WriteStream & os) const { ModeSpecifier specifier(os, currentMode()); - docstring const latex_name = name().c_str(); + docstring const latex_name = name(); os << '\\' << latex_name; for (size_t i = 0; i < nargs(); ++i) os << '{' << cell(i) << '}'; @@ -352,7 +352,7 @@ void InsetMathNest::write(WriteStream & os) const void InsetMathNest::normalize(NormalStream & os) const { - os << '[' << name().c_str(); + os << '[' << name(); for (size_t i = 0; i < nargs(); ++i) os << ' ' << cell(i); os << ']'; diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index e889deb226..11b9ae90c6 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -1141,7 +1141,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons else os << "\\newcommandx"; - os << "\\" << name().c_str() + os << "\\" << name() << "[" << numargs_ << "]" << "[usedefault, addprefix=\\global"; for (int i = 0; i < optionals_; ++i) { @@ -1158,7 +1158,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons } else { // macros without optionals use standard _global_ \def macros: // \global\def\foo#1#2{#1,#2} - os << "\\global\\def\\" << name().c_str(); + os << "\\global\\def\\" << name(); docstring param = from_ascii("#0"); for (int i = 1; i <= numargs_; ++i) { param[1] = '0' + i; @@ -1173,7 +1173,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons os << "\\renewcommand"; else os << "\\newcommand"; - os << "{\\" << name().c_str() << '}'; + os << "{\\" << name() << '}'; if (numargs_ > 0) os << '[' << numargs_ << ']';