pyuno/source/module/pyuno_adapter.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit b733ccad171e6def8fbdb93f31875dfdea47bdc6 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Sep 11 19:31:20 2021 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Sep 12 00:41:12 2021 +0200 Make this instance of cppu::OImplementationId function-local Change-Id: I1feaaec9906fd06ae86226c35820072d8b19cf17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121891 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx index a8efd4153831..53e012a8e78f 100644 --- a/pyuno/source/module/pyuno_adapter.cxx +++ b/pyuno/source/module/pyuno_adapter.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/beans/XIntrospection.hpp> #include <comphelper/sequence.hxx> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/typeprovider.hxx> @@ -66,16 +67,15 @@ Adapter::~Adapter() mWrappedObject.scratch(); } -static cppu::OImplementationId g_id( false ); - Sequence<sal_Int8> Adapter::getUnoTunnelId() { + static const cppu::OImplementationId g_id(false); return g_id.getImplementationId(); } sal_Int64 Adapter::getSomething( const Sequence< sal_Int8 > &id) { - if( id == g_id.getImplementationId() ) + if (isUnoTunnelId<Adapter>(id)) return reinterpret_cast<sal_Int64>(this); return 0; }