summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /cppu
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/uno/lbenv.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 32529b8e4564..3a86f9882b7f 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -121,7 +121,7 @@ struct EnvironmentsData
void registerEnvironment( uno_Environment ** ppEnv );
void getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen,
- uno_memAlloc memAlloc, const OUString & rEnvDcp );
+ uno_memAlloc memAlloc, std::u16string_view rEnvDcp );
bool isDisposing;
};
@@ -968,7 +968,7 @@ void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv )
void EnvironmentsData::getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
- const OUString & rEnvDcp )
+ std::u16string_view rEnvDcp )
{
assert(pppEnvs && pnLen && memAlloc && "### null ptr!");
@@ -980,8 +980,8 @@ void EnvironmentsData::getRegisteredEnvironments(
for ( const auto& rEntry : aName2EnvMap )
{
uno_Environment * pWeak = rEntry.second;
- if (rEnvDcp.isEmpty() ||
- rEnvDcp == pWeak->pTypeName )
+ if (rEnvDcp.empty() ||
+ rEnvDcp == OUString::unacquired(&pWeak->pTypeName) )
{
aFounds[nSize] = nullptr;
(*pWeak->harden)( &aFounds[nSize], pWeak );