summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-17 15:00:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-18 08:36:01 +0200
commit08f7502bf8a186a7b3d600c3543069ea544cabef (patch)
tree10be0b2d57910eeff9d2e0372bbb413b0ba3cd55 /extensions
parentaf92290f7e7afc48a58fa592226f00b0e6f63418 (diff)
no need to call acquire()
when we are returning an uno::Reference Change-Id: Ifff0dba20f45f5321f398577fa7d5fb073278a94 Reviewed-on: https://gerrit.libreoffice.org/43472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/inc/componentmodule.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index 40273cf879de..5d031a67d1a5 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -136,9 +136,6 @@ namespace compmodule
"OModule::getComponentFactory : inconsistent state !");
- Reference< XInterface > xReturn;
-
-
sal_Int32 nLen = s_pImplementationNames->size();
for (sal_Int32 i=0; i<nLen; ++i)
@@ -147,14 +144,10 @@ namespace compmodule
{
const FactoryInstantiation FactoryInstantiationFunction = (*s_pFactoryFunctionPointers)[i];
- xReturn = FactoryInstantiationFunction( _rxServiceManager, _rImplementationName,
+ Reference< XInterface > xReturn = FactoryInstantiationFunction( _rxServiceManager, _rImplementationName,
(*s_pCreationFunctionPointers)[i],
(*s_pSupportedServices)[i], nullptr);
- if (xReturn.is())
- {
- xReturn->acquire();
- return xReturn.get();
- }
+ return xReturn;
}
}