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>
This commit is contained in:
parent
74957c7d2f
commit
a5343a89f8
4 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2149,15 +2149,15 @@ css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct(
|
|||
}
|
||||
|
||||
css::uno::Any cppuhelper::TypeManager::getInterfaceMember(
|
||||
OUString const & name, sal_Int32 separator)
|
||||
std::u16string_view name, sal_Int32 separator)
|
||||
{
|
||||
assert(name.indexOf("::") == separator && separator != -1);
|
||||
assert(static_cast<sal_Int32>(name.find(u"::")) == separator && separator != -1);
|
||||
css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc(
|
||||
resolveTypedefs(find(name.copy(0, separator))), css::uno::UNO_QUERY);
|
||||
resolveTypedefs(find(OUString(name.substr(0, separator)))), css::uno::UNO_QUERY);
|
||||
if (!ifc.is()) {
|
||||
return css::uno::Any();
|
||||
}
|
||||
OUString member(name.copy(separator + std::strlen("::")));
|
||||
std::u16string_view member = name.substr(separator + std::strlen("::"));
|
||||
const css::uno::Sequence<
|
||||
css::uno::Reference<
|
||||
css::reflection::XInterfaceMemberTypeDescription > > mems(
|
||||
|
|
|
@ -100,7 +100,7 @@ private:
|
|||
OUString const & name, sal_Int32 separator);
|
||||
|
||||
css::uno::Any getInterfaceMember(
|
||||
OUString const & name, sal_Int32 separator);
|
||||
std::u16string_view name, sal_Int32 separator);
|
||||
|
||||
css::uno::Any getNamed(
|
||||
OUString const & name,
|
||||
|
|
Loading…
Reference in a new issue