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.kaganski@collabora.com>
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index a8efd41..53e012a 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;
}