From 08f7502bf8a186a7b3d600c3543069ea544cabef Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 17 Oct 2017 15:00:09 +0200 Subject: 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 Reviewed-by: Noel Grandin --- extensions/source/inc/componentmodule.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'extensions') 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 xReturn = FactoryInstantiationFunction( _rxServiceManager, _rImplementationName, (*s_pCreationFunctionPointers)[i], (*s_pSupportedServices)[i], nullptr); - if (xReturn.is()) - { - xReturn->acquire(); - return xReturn.get(); - } + return xReturn; } } -- cgit