summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-28 10:35:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-28 12:07:54 +0100
commitbc539bd3c04964471af6b5ca54264215c8995696 (patch)
treec37af5b9fb3dc0b8677fc8dd535fb8e93ad6039d /sal
parent9f78a4174e5099ad3af65a23e158a51c1afca54d (diff)
loplugin:stringadd improve detection
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/file/osl_File.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 348b259bc4e0..6b17d07098c6 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -967,11 +967,12 @@ namespace osl_FileBase
bool bOk = compareFileName(aUStr, aUResultURL);
- OString sError = "test for getSystemPathFromFileURL(' " +
+ OString sError =
+ "test for getSystemPathFromFileURL(' " +
OUStringToOString(aUNormalURL, RTL_TEXTENCODING_ASCII_US) +
- " ') function:use an absolute file URL, ";
- sError += outputError(OUStringToOString(aUStr, RTL_TEXTENCODING_ASCII_US),
- OUStringToOString(aUResultURL, RTL_TEXTENCODING_ASCII_US));
+ " ') function:use an absolute file URL, " +
+ outputError(OUStringToOString(aUStr, RTL_TEXTENCODING_ASCII_US),
+ OUStringToOString(aUResultURL, RTL_TEXTENCODING_ASCII_US));
CPPUNIT_ASSERT_EQUAL_MESSAGE(sError.getStr(), osl::FileBase::E_None, nError);
CPPUNIT_ASSERT_MESSAGE(sError.getStr(), bOk);
@@ -990,11 +991,12 @@ namespace osl_FileBase
bool bOk = compareFileName(aUStr, aUResultURL);
- OString sError = "test for getSystemPathFromFileURL(' " +
+ OString sError =
+ "test for getSystemPathFromFileURL(' " +
OUStringToOString(aUNormalURL, RTL_TEXTENCODING_ASCII_US) +
- " ') function:use a CJK coded absolute URL, ";
- sError += outputError(OUStringToOString(aUStr, RTL_TEXTENCODING_ASCII_US),
- OUStringToOString(aUResultURL, RTL_TEXTENCODING_ASCII_US));
+ " ') function:use a CJK coded absolute URL, " +
+ outputError(OUStringToOString(aUStr, RTL_TEXTENCODING_ASCII_US),
+ OUStringToOString(aUResultURL, RTL_TEXTENCODING_ASCII_US));
deleteTestDirectory(aTmpName10);
CPPUNIT_ASSERT_EQUAL_MESSAGE(sError.getStr(), osl::FileBase::E_None, nError);