loplugin:simplifybool
Change-Id: I6e181bc4b144c2559ede99d3bae0496cf546415c
This commit is contained in:
@@ -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;
|
||||
|
@@ -550,7 +550,7 @@ bool SbiTokenizer::MayBeLabel( bool bNeedsColon )
|
||||
{
|
||||
if( eCurTok == SYMBOL || m_aTokenLabelInfo.canTokenBeLabel( eCurTok ) )
|
||||
{
|
||||
return bNeedsColon ? DoesColonFollow() : true;
|
||||
return !bNeedsColon || DoesColonFollow();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user