From 4b2262ab5b10f334f1984fec84d2978db81c58f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 Jul 2017 08:32:57 +0200 Subject: new loplugin unnecessaryparen Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 12 ++++++------ basic/source/runtime/methods.cxx | 2 +- basic/source/runtime/runtime.cxx | 2 +- basic/source/sbx/sbxvalue.cxx | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index ee745c711848..68e7f798956b 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -643,7 +643,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) { ArrayWrapper aWrap; NativeObjectWrapper aNativeObjectWrapper; - if ( (aValue >>= aWrap) ) + if ( aValue >>= aWrap ) { SbxDimArray* pArray = nullptr; Sequence< sal_Int32 > indices; @@ -662,10 +662,10 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) pVar->PutEmpty(); break; } - else if ( (aValue >>= aNativeObjectWrapper) ) + else if ( aValue >>= aNativeObjectWrapper ) { sal_uInt32 nIndex = 0; - if( (aNativeObjectWrapper.ObjectId >>= nIndex) ) + if( aNativeObjectWrapper.ObjectId >>= nIndex ) { SbxObject* pObj = lcl_getNativeObject( nIndex ); pVar->PutObject( pObj ); @@ -680,7 +680,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) if( pInst && pInst->IsCompatibility() ) { oleautomation::Date aDate; - if( (aValue >>= aDate) ) + if( aValue >>= aDate ) { pVar->PutDate( aDate.Value ); break; @@ -688,7 +688,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) else { oleautomation::Decimal aDecimal; - if( (aValue >>= aDecimal) ) + if( aValue >>= aDecimal ) { pVar->PutDecimal( aDecimal ); break; @@ -696,7 +696,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) else { oleautomation::Currency aCurrency; - if( (aValue >>= aCurrency) ) + if( aValue >>= aCurrency ) { pVar->PutCurrency( aCurrency.Value ); break; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index fcc14f684e73..996542c4b854 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -922,7 +922,7 @@ void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool) if ( nArgCount >= 3 ) { nStartPos = rPar.Get(3)->GetLong(); - if( (nStartPos <= 0 && nStartPos != -1)) + if( nStartPos <= 0 && nStartPos != -1 ) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); nStartPos = -1; diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 998e61133fb3..41e3e8afd7e6 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1144,7 +1144,7 @@ void SbiRuntime::PushForEach() // XEnumerationAccess? Any aAny = pUnoObj->getUnoAny(); Reference< XEnumerationAccess > xEnumerationAccess; - if( (aAny >>= xEnumerationAccess) ) + if( aAny >>= xEnumerationAccess ) { p->xEnumeration = xEnumerationAccess->createEnumeration(); p->eForType = ForType::EachXEnumeration; diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 89430af80530..1f79b69230ad 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -1175,7 +1175,7 @@ Lbl_OpIsDouble: // result is always a Date, if '-' the result is only // a Date if one of lhs or rhs ( but not both ) is already // a Date - if( ( GetType() == SbxDATE || rOp.GetType() == SbxDATE ) ) + if( GetType() == SbxDATE || rOp.GetType() == SbxDATE ) { if( eOp == SbxPLUS || ( ( eOp == SbxMINUS ) && ( GetType() != rOp.GetType() ) ) ) aL.eType = SbxDATE; -- cgit