From eaf071397a1ff30536616f2ed76051f77fd38ed6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 7 Apr 2023 10:02:18 +0200 Subject: new loplugin:unnecessarygetstr which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin --- tools/source/xml/XmlWriter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/source/xml/XmlWriter.cxx b/tools/source/xml/XmlWriter.cxx index 726b63966045..85fbbf99544e 100644 --- a/tools/source/xml/XmlWriter.cxx +++ b/tools/source/xml/XmlWriter.cxx @@ -134,7 +134,7 @@ void XmlWriter::attribute(const OString& name, const OString& value) void XmlWriter::attribute(const OString& name, std::u16string_view value) { - attribute(name, OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr()); + attribute(name, OUStringToOString(value, RTL_TEXTENCODING_UTF8)); } void XmlWriter::attribute(const OString& name, const sal_Int32 aNumber) -- cgit v1.2.3