diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-13 14:04:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-13 16:11:49 +0200 |
commit | a5343a89f898468178f04c241de0b2c2a314a1b5 (patch) | |
tree | 3e8118f488b2bfaec4cf1a793d297e878166e66a /cppu | |
parent | 74957c7d2f3697fbf2b6f4d6a31c61d5d7df039b (diff) |
use more string_view in cppu
Change-Id: Ifd2ee4827e0083ffaff9120fee239fb16553380e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132957
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/source/uno/EnvStack.cxx | 4 | ||||
-rw-r--r-- | cppu/source/uno/cascade_mapping.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx index 880b922886d1..2daf56a21a79 100644 --- a/cppu/source/uno/EnvStack.cxx +++ b/cppu/source/uno/EnvStack.cxx @@ -141,7 +141,7 @@ extern "C" void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl } } -static OUString s_getPrefix(OUString const & str1, std::u16string_view str2) +static OUString s_getPrefix(std::u16string_view str1, std::u16string_view str2) { sal_Int32 nIndex1 = 0; sal_Int32 nIndex2 = 0; @@ -163,7 +163,7 @@ static OUString s_getPrefix(OUString const & str1, std::u16string_view str2) OUString result; if (sim) - result = str1.copy(0, sim - 1); + result = str1.substr(0, sim - 1); return result; } diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx index dbfbfc6c4dba..f03d88e529d6 100644 --- a/cppu/source/uno/cascade_mapping.cxx +++ b/cppu/source/uno/cascade_mapping.cxx @@ -156,7 +156,7 @@ extern "C" { static void s_MediatorMapping_free(uno_Mapping * pMapping) }} -static OUString getPrefix(OUString const & str1, std::u16string_view str2) +static OUString getPrefix(std::u16string_view str1, std::u16string_view str2) { sal_Int32 nIndex1 = 0; sal_Int32 nIndex2 = 0; @@ -178,7 +178,7 @@ static OUString getPrefix(OUString const & str1, std::u16string_view str2) OUString result; if (sim) - result = str1.copy(0, sim - 1); + result = str1.substr(0, sim - 1); return result; } |