From 40fa3a61ac7dbe2ba73b5ee71bb85cc3bb4a27af Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 27 Oct 2020 23:18:23 +0100 Subject: Extend loplugin:elidestringvar to OString (In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar] > aXmlWriter.content(sPdfConformance); > ^~~~~~~~~~~~~~~ > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar] > OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B"; > ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/qa/rtl/uri/rtl_Uri.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sal/qa/rtl/uri') diff --git a/sal/qa/rtl/uri/rtl_Uri.cxx b/sal/qa/rtl/uri/rtl_Uri.cxx index 81ec983450f5..1084926c65bb 100644 --- a/sal/qa/rtl/uri/rtl_Uri.cxx +++ b/sal/qa/rtl/uri/rtl_Uri.cxx @@ -47,8 +47,7 @@ namespace Stringtest void test_FromUTF8_001() { // string --> ustring - OString sStrUTF8("h%C3%A4llo"); - OUString suStrUTF8 = OStringToOUString(sStrUTF8, RTL_TEXTENCODING_ASCII_US); + OUString suStrUTF8 = OStringToOUString("h%C3%A4llo", RTL_TEXTENCODING_ASCII_US); // UTF8 --> real ustring OUString suStr_UriDecodeToIuri = rtl::Uri::decode(suStrUTF8, rtl_UriDecodeToIuri, RTL_TEXTENCODING_UTF8); -- cgit