diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-06 10:12:29 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-10 12:23:42 +0100 |
commit | 065edb4c8e91170017df482843d0c3eb8d4db114 (patch) | |
tree | 1d030ec9868a56b375a563c9d6e6d81c6115d717 /extensions | |
parent | 0b34a5dd39e177ba99cd21b639d67ac8123b8458 (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643
Reviewed-on: https://gerrit.libreoffice.org/63235
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/ole/unoconversionutilities.hxx | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/stringrepresentation.cxx | 10 |
2 files changed, 4 insertions, 11 deletions
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index f04466efe73c..ec8c46d80016 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -1927,7 +1927,6 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva { try { - bool bFail = false; if( pvar->vt != VT_DISPATCH) throw BridgeRuntimeError("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" "Conversion of dispatch object to Sequence failed!"); @@ -2038,10 +2037,6 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva anySeq.setValue( &p_uno_Seq, pDesc); uno_destructData( &p_uno_Seq, pDesc, cpp_release); typelib_typedescription_release( pDesc); - - if (bFail) - throw BridgeRuntimeError( - "[automation bridge] Conversion of ValueObject failed "); } catch (const BridgeRuntimeError &) { diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index bdca73fe13fc..b28df28c0e0e 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -338,14 +338,12 @@ namespace // loop through the elements and concatenate the string representations of the integers // (separated by a line break) - const ElementType* pElements = _rElements.getConstArray(); - const ElementType* pElementsEnd = pElements + _rElements.getLength(); - for ( ; pElements != pElementsEnd; ++pElements ) + for (const auto& rElement : _rElements) { - sCompose.append( OUString( _rTransformer( *pElements ) ) ); - if ( pElements != pElementsEnd ) - sCompose.append("\n"); + sCompose.append(OUString(_rTransformer(rElement))); + sCompose.append("\n"); } + sCompose.stripEnd('\n'); return sCompose.makeStringAndClear(); } |