diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-15 19:33:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-16 08:15:54 +0200 |
commit | cd7471335a05e7dd7eca16ac0b181d96cfa7912b (patch) | |
tree | ae91004516ef87f82c9a5300c0c4f2f0d7d2bddf /stoc | |
parent | eca8526607d8e5b883989adf480780661380b12e (diff) |
loplugin:buriedassign in starmath..svl
Change-Id: I979faf4c476a7de91a0b6e06dd8717cee25525f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92313
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/corereflection/crefl.cxx | 6 | ||||
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 55b742d1a2fe..e4f879495c3f 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -200,7 +200,8 @@ Reference< XIdlClass > IdlReflectionServiceImpl::forName( const OUString & rType typelib_typedescription_getByName( &pTD, rTypeName.pData ); if (pTD) { - if ((xRet = constructClass( pTD )).is()) + xRet = constructClass( pTD ); + if (xRet.is()) _aElements.setValue( rTypeName, makeAny( xRet ) ); // update typelib_typedescription_release( pTD ); } @@ -287,7 +288,8 @@ Reference< XIdlClass > IdlReflectionServiceImpl::forType( typelib_TypeDescriptio } else { - if ((xRet = constructClass( pTypeDescr )).is()) + xRet = constructClass( pTypeDescr ); + if (xRet.is()) _aElements.setValue( aName, makeAny( xRet ) ); // update } diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 933e89c24d87..554c13400fdd 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -507,7 +507,8 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy "value is not interface", Reference< XInterface >(), aDestinationClass, FailReason::NO_SUCH_INTERFACE, 0 ); } - if (! (aRet = (*ifc)->queryInterface(aDestType )).hasValue()) + aRet = (*ifc)->queryInterface(aDestType ); + if (! aRet.hasValue()) { throw CannotConvertException( "value does not implement " + aDestType.getTypeName(), |