summaryrefslogtreecommitdiff
path: root/cppuhelper/source/factory.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 10:47:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-12 10:11:34 +0200
commit992a33313046f4a4d322db9464c474e7429a019a (patch)
tree494143e3070af872027ecaca840516d3101a881c /cppuhelper/source/factory.cxx
parent77c1431ee88ab04a9ff48b849acedee6d455bafb (diff)
clang-tidy: readability-else-after-return
run it against sal,cppu,cppuhelper I had to run this multiple times to catch all the cases in each module, and it requires some hand-tweaking of the resulting output - clang-tidy is not very good about cleaning up trailing spaces, and aligning things nicely. Change-Id: I00336345f5f036e12422b98d66526509380c497a Reviewed-on: https://gerrit.libreoffice.org/36194 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper/source/factory.cxx')
-rw-r--r--cppuhelper/source/factory.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 55b4f55b90d3..9ed9d0d6b320 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -139,7 +139,7 @@ Reference<XInterface > OSingleFactoryHelper::createInstanceEveryTime(
{
return (*m_fptr)( xContext );
}
- else if( pCreateFunction )
+ if( pCreateFunction )
{
if (xContext.is())
{
@@ -150,10 +150,7 @@ Reference<XInterface > OSingleFactoryHelper::createInstanceEveryTime(
}
return (*pCreateFunction)( xSMgr );
}
- else
- {
- return Reference< XInterface >();
- }
+ return Reference< XInterface >();
}
// XSingleServiceFactory
@@ -510,8 +507,7 @@ Any SAL_CALL ORegistryFactoryHelper::queryInterface(
Any ret( OFactoryComponentHelper::queryInterface( type ) );
if (ret.hasValue())
return ret;
- else
- return OPropertySetHelper::queryInterface( type );
+ return OPropertySetHelper::queryInterface( type );
}
@@ -624,7 +620,7 @@ Reference<XInterface > ORegistryFactoryHelper::createInstanceEveryTime(
{
return xModuleFactory->createInstanceWithContext( xContext );
}
- else if( xModuleFactoryDepr.is() )
+ if( xModuleFactoryDepr.is() )
{
return xModuleFactoryDepr->createInstance();
}
@@ -652,7 +648,7 @@ Reference<XInterface > SAL_CALL ORegistryFactoryHelper::createInstanceWithArgume
{
return xModuleFactoryDepr->createInstanceWithArguments( Arguments );
}
- else if( xModuleFactory.is() )
+ if( xModuleFactory.is() )
{
SAL_INFO("cppuhelper", "no context ORegistryFactoryHelper::createInstanceWithArgumentsAndContext()!");
return xModuleFactory->createInstanceWithArgumentsAndContext( Arguments, Reference< XComponentContext >() );
@@ -682,7 +678,7 @@ Reference< XInterface > ORegistryFactoryHelper::createInstanceWithArgumentsAndCo
{
return xModuleFactory->createInstanceWithArgumentsAndContext( rArguments, xContext );
}
- else if( xModuleFactoryDepr.is() )
+ if( xModuleFactoryDepr.is() )
{
SAL_INFO_IF(xContext.is(), "cppuhelper", "ignoring context calling ORegistryFactoryHelper::createInstaceWithArgumentsAndContext()!");
return xModuleFactoryDepr->createInstanceWithArguments( rArguments );