Kaydet (Commit) 08f7502b authored tarafından Noel Grandin's avatar Noel Grandin

no need to call acquire()

when we are returning an uno::Reference

Change-Id: Ifff0dba20f45f5321f398577fa7d5fb073278a94
Reviewed-on: https://gerrit.libreoffice.org/43472Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst af92290f
...@@ -136,9 +136,6 @@ namespace compmodule ...@@ -136,9 +136,6 @@ namespace compmodule
"OModule::getComponentFactory : inconsistent state !"); "OModule::getComponentFactory : inconsistent state !");
Reference< XInterface > xReturn;
sal_Int32 nLen = s_pImplementationNames->size(); sal_Int32 nLen = s_pImplementationNames->size();
for (sal_Int32 i=0; i<nLen; ++i) for (sal_Int32 i=0; i<nLen; ++i)
...@@ -147,14 +144,10 @@ namespace compmodule ...@@ -147,14 +144,10 @@ namespace compmodule
{ {
const FactoryInstantiation FactoryInstantiationFunction = (*s_pFactoryFunctionPointers)[i]; const FactoryInstantiation FactoryInstantiationFunction = (*s_pFactoryFunctionPointers)[i];
xReturn = FactoryInstantiationFunction( _rxServiceManager, _rImplementationName, Reference< XInterface > xReturn = FactoryInstantiationFunction( _rxServiceManager, _rImplementationName,
(*s_pCreationFunctionPointers)[i], (*s_pCreationFunctionPointers)[i],
(*s_pSupportedServices)[i], nullptr); (*s_pSupportedServices)[i], nullptr);
if (xReturn.is()) return xReturn;
{
xReturn->acquire();
return xReturn.get();
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment