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 /cppuhelper | |
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 'cppuhelper')
-rw-r--r-- | cppuhelper/source/typemanager.cxx | 8 | ||||
-rw-r--r-- | cppuhelper/source/typemanager.hxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index 28ef85189f29..44105df033fa 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -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( diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx index 1ee264bf16ff..28c193191267 100644 --- a/cppuhelper/source/typemanager.hxx +++ b/cppuhelper/source/typemanager.hxx @@ -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, |