summaryrefslogtreecommitdiff
path: root/pyuno/source/module
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-11 19:31:20 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-12 00:41:12 +0200
commitb733ccad171e6def8fbdb93f31875dfdea47bdc6 (patch)
tree99046a7abe2a132faa92476a3385ae436f825b9a /pyuno/source/module
parent77fca82aab16619a693d53e970ac717f54105e95 (diff)
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>
Diffstat (limited to 'pyuno/source/module')
-rw-r--r--pyuno/source/module/pyuno_adapter.cxx6
1 files changed, 3 insertions, 3 deletions
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;
}