summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /unodevtools
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx8
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx4
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.hxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index b4d26e0e0a18..7f8ca012d3b7 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -40,7 +40,7 @@ static void generatePackage(std::ostream & o, const OString & implname)
}
static void generateImports(std::ostream & o, ProgramOptions const & options,
- const OUString & propertyhelper,
+ std::u16string_view propertyhelper,
bool serviceobject, bool supportxcomponent)
{
if (options.componenttype == 3)
@@ -52,14 +52,14 @@ static void generateImports(std::ostream & o, ProgramOptions const & options,
o << "import com.sun.star.registry.XRegistryKey;\n";
}
- if (propertyhelper != "_") {
+ if (propertyhelper != u"_") {
if (supportxcomponent)
o << "import com.sun.star.lib.uno.helper.ComponentBase;\n";
else
o << "import com.sun.star.lib.uno.helper.WeakBase;\n";
}
- if (!propertyhelper.isEmpty()) {
- if (propertyhelper == "_") {
+ if (!propertyhelper.empty()) {
+ if (propertyhelper == u"_") {
o << "import com.sun.star.lib.uno.helper.PropertySet;\n";
o << "import com.sun.star.beans.PropertyAttribute;\n";
} else {
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 37041a8be951..21a174b69e1a 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -237,7 +237,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
void checkDefaultInterfaces(
std::set< OUString >& interfaces,
const std::set< OUString >& services,
- const OUString & propertyhelper)
+ std::u16string_view propertyhelper)
{
if ( services.empty() ) {
interfaces.erase("com.sun.star.lang.XServiceInfo");
@@ -245,7 +245,7 @@ void checkDefaultInterfaces(
interfaces.insert("com.sun.star.lang.XServiceInfo");
}
- if ( propertyhelper == "_" ) {
+ if ( propertyhelper == u"_" ) {
interfaces.erase("com.sun.star.beans.XPropertySet");
interfaces.erase("com.sun.star.beans.XFastPropertySet");
interfaces.erase("com.sun.star.beans.XPropertyAccess");
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.hxx b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
index d73152e70167..64c52eb59d65 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.hxx
@@ -103,7 +103,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
void checkDefaultInterfaces(
std::set< OUString >& interfaces,
const std::set< OUString >& services,
- const OUString & propertyhelper);
+ std::u16string_view propertyhelper);
OUString checkPropertyHelper(
ProgramOptions const & options, rtl::Reference< TypeManager > const & manager,