diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:24:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:18 +0200 |
commit | ed83ba34a55857f1a4f1c1f1577bb25dcf733bd4 (patch) | |
tree | a78051761bee3543e8d633f0d51e157de8326907 /basic | |
parent | d39b9c29d53932a55e963caceb5721353815e765 (diff) |
loplugin:simplifybool
Change-Id: I6e181bc4b144c2559ede99d3bae0496cf546415c
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/token.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index c78880ef32ea..c63c03eabef5 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -546,7 +546,7 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ) SbxDimArray* pSource = PTR_CAST(SbxDimArray,pParObj); SbxDimArray* pDest = new SbxDimArray( pVar->GetType() ); - pDest->setHasFixedSize( pSource ? pSource->hasFixedSize() : false ); + pDest->setHasFixedSize( pSource && pSource->hasFixedSize() ); if ( pSource && pSource->GetDims() && pSource->hasFixedSize() ) { sal_Int32 lb = 0; diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index 553de30f7d28..e49b2ae3155b 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -550,7 +550,7 @@ bool SbiTokenizer::MayBeLabel( bool bNeedsColon ) { if( eCurTok == SYMBOL || m_aTokenLabelInfo.canTokenBeLabel( eCurTok ) ) { - return bNeedsColon ? DoesColonFollow() : true; + return !bNeedsColon || DoesColonFollow(); } else { diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index b994330fb627..fc060f725790 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2517,7 +2517,7 @@ RTLFUNC(IsArray) } else { - rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) ? true : false ); + rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) != 0); } } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 9e6ad47b3b74..a1eca5f5a1ae 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1084,7 +1084,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, { pStrm->Seek( nFPos + nBlockLen ); } - return pStrm->GetErrorCode() ? false : true; + return pStrm->GetErrorCode() == 0; } static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, @@ -1195,7 +1195,7 @@ static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, { pStrm->Seek( nFPos + nBlockLen ); } - return pStrm->GetErrorCode() ? false : true; + return pStrm->GetErrorCode() == 0; } |