summaryrefslogtreecommitdiffstats
path: root/cppuhelper/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-06-02 21:09:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-06-02 22:07:35 +0200
commite3b48ed3b8ca5d3fd65efdb778fc51743123b976 (patch)
tree3d87bba8a005e76e19331846e1a01e5684b69089 /cppuhelper/source
parentUse more appropriate type for LocationAccess::nOwnClassVectorIndex (diff)
downloadcore-e3b48ed3b8ca5d3fd65efdb778fc51743123b976.tar.gz
core-e3b48ed3b8ca5d3fd65efdb778fc51743123b976.zip
Fix type of cppuhelper::TypeManager::getInterfaceMember separator param
...after a5343a89f898468178f04c241de0b2c2a314a1b5 "use more string_view in cppu" Change-Id: I7cd577f50cd92586e00f347b2e05247b6b5b0331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135326 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppuhelper/source')
-rw-r--r--cppuhelper/source/typemanager.cxx4
-rw-r--r--cppuhelper/source/typemanager.hxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx
index 39bec6b9cada..bede11f7c405 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -2147,9 +2147,9 @@ css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct(
}
css::uno::Any cppuhelper::TypeManager::getInterfaceMember(
- std::u16string_view name, sal_Int32 separator)
+ std::u16string_view name, std::size_t separator)
{
- assert(static_cast<sal_Int32>(name.find(u"::")) == separator && separator != -1);
+ assert(name.find(u"::") == separator && separator != std::u16string_view::npos);
css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > ifc(
resolveTypedefs(find(OUString(name.substr(0, separator)))), css::uno::UNO_QUERY);
if (!ifc.is()) {
diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx
index 1a795fe22f8e..24fe0ef12166 100644
--- a/cppuhelper/source/typemanager.hxx
+++ b/cppuhelper/source/typemanager.hxx
@@ -11,6 +11,8 @@
#include <sal/config.h>
+#include <cstddef>
+
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -100,7 +102,7 @@ private:
OUString const & name, sal_Int32 separator);
css::uno::Any getInterfaceMember(
- std::u16string_view name, sal_Int32 separator);
+ std::u16string_view name, std::size_t separator);
css::uno::Any getNamed(
OUString const & name,