summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-13 08:47:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 08:26:14 +0200
commit9b5dad13b56bdde7c40970351af3da3a2c3c9350 (patch)
treeabfd4b02743a0e6a93c51c026f4c53f0e21100bc /jvmfwk
parentfa71320329999c968feb16ff65be328b5b8ff5e4 (diff)
loplugin:stringadd look for unnecessary temporaries
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/source/fwkbase.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 3e17431ebc1c..ece4dd2bd717 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -100,7 +100,7 @@ VendorSettings::VendorSettings():
if (m_xmlDocVendorSettings == nullptr)
throw FrameworkException(
JFW_E_ERROR,
- OString("[Java framework] Error while parsing file: ")
+ OStringLiteral("[Java framework] Error while parsing file: ")
+ sSettingsPath + ".");
m_xmlPathContextVendorSettings = xmlXPathNewContext(m_xmlDocVendorSettings);
@@ -130,9 +130,9 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin
VersionInfo aVersionInfo;
//Get minVersion
- OString sExpression = OString(
- "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") +
- osVendor + OString("\"]/jf:minVersion");
+ OString sExpression =
+ "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"" +
+ osVendor + "\"]/jf:minVersion";
CXPathObjectPtr xPathObjectMin =
xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
@@ -152,8 +152,8 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin
}
//Get maxVersion
- sExpression = OString("/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") +
- osVendor + OString("\"]/jf:maxVersion");
+ sExpression = "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"" +
+ osVendor + "\"]/jf:maxVersion";
CXPathObjectPtr xPathObjectMax = xmlXPathEvalExpression(
reinterpret_cast<xmlChar const *>(sExpression.getStr()),
m_xmlPathContextVendorSettings);
@@ -172,8 +172,8 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin
}
//Get excludeVersions
- sExpression = OString("/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") +
- osVendor + OString("\"]/jf:excludeVersions/jf:version");
+ sExpression = "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"" +
+ osVendor + "\"]/jf:excludeVersions/jf:version";
CXPathObjectPtr xPathObjectVersions =
xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
m_xmlPathContextVendorSettings);
@@ -253,7 +253,7 @@ OString BootParams::getClasspath()
if (pCp)
{
char szSep[] = {SAL_PATHSEPARATOR,0};
- sClassPath += OString(szSep) + OString(pCp);
+ sClassPath += OStringLiteral(szSep) + pCp;
}
SAL_INFO(
"jfw.level2",