diff --git a/src/insets/insetcommand.C b/src/insets/insetcommand.C index 6f58d51840..359b4decd0 100644 --- a/src/insets/insetcommand.C +++ b/src/insets/insetcommand.C @@ -95,7 +95,7 @@ int InsetCommand::latex(Buffer const &, odocstream & os, int InsetCommand::plaintext(Buffer const &, odocstream & os, OutputParams const &) const { - docstring str = "[" + _("LaTeX Command: ") + from_utf8(getCmdName()) + "]"; + docstring const str = "[" + _("LaTeX Command: ") + from_utf8(getCmdName()) + "]"; os << str; return str.size(); } diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index 407de303d1..a54307361e 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -818,8 +818,8 @@ int InsetGraphics::plaintext(Buffer const &, odocstream & os, // FIXME UNICODE // FIXME: We have no idea what the encoding of the filename is - docstring str = bformat(_("Graphics file: %1$s"), - from_utf8(params().filename.absFilename())); + docstring const str = bformat(_("Graphics file: %1$s"), + from_utf8(params().filename.absFilename())); os << '<' << str << '>'; return 2 + str.size(); diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index 0eaf0d5437..067df5ac4e 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -502,7 +502,7 @@ int InsetInclude::plaintext(Buffer const & buffer, odocstream & os, os << "\n]"; return PLAINTEXT_NEWLINE + 1; // one char on a separate line } else { - docstring str = '[' + getScreenLabel(buffer) + ']'; + docstring const str = '[' + getScreenLabel(buffer) + ']'; os << str; return str.size(); } diff --git a/src/insets/insetlabel.C b/src/insets/insetlabel.C index 682b98f546..bdac8f43a1 100644 --- a/src/insets/insetlabel.C +++ b/src/insets/insetlabel.C @@ -96,7 +96,7 @@ int InsetLabel::latex(Buffer const &, odocstream & os, int InsetLabel::plaintext(Buffer const &, odocstream & os, OutputParams const &) const { - docstring str = getParam("name"); + docstring const str = getParam("name"); os << '<' << str << '>'; return 2 + str.size(); } diff --git a/src/insets/insetquotes.C b/src/insets/insetquotes.C index b9d1957be0..779b78d9e4 100644 --- a/src/insets/insetquotes.C +++ b/src/insets/insetquotes.C @@ -331,7 +331,7 @@ int InsetQuotes::latex(Buffer const &, odocstream & os, int InsetQuotes::plaintext(Buffer const & buf, odocstream & os, OutputParams const &) const { - docstring str = dispString(buf.params().language); + docstring const str = dispString(buf.params().language); os << str; return str.size(); } diff --git a/src/insets/insetref.C b/src/insets/insetref.C index dd7a79892b..85dca1c865 100644 --- a/src/insets/insetref.C +++ b/src/insets/insetref.C @@ -97,7 +97,7 @@ int InsetRef::latex(Buffer const &, odocstream & os, int InsetRef::plaintext(Buffer const &, odocstream & os, OutputParams const &) const { - docstring str = getParam("reference"); + docstring const str = getParam("reference"); os << '[' << str << ']'; return 2 + str.size(); } diff --git a/src/insets/inseturl.C b/src/insets/inseturl.C index ff3e4229dd..eb67e6e117 100644 --- a/src/insets/inseturl.C +++ b/src/insets/inseturl.C @@ -81,7 +81,7 @@ int InsetUrl::plaintext(Buffer const &, odocstream & os, else oss << "||" << getParam("name") << ']'; - docstring str = oss.str(); + docstring const str = oss.str(); os << str; return str.size(); }