extensions/source/inc/componentmodule.cxx |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 08f7502bf8a186a7b3d600c3543069ea544cabef
Author: Noel Grandin <[email protected]>
Date:   Tue Oct 17 15:00:09 2017 +0200

    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 <[email protected]>
    Reviewed-by: Noel Grandin <[email protected]>

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;
             }
         }
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to