From b226928c6d5d094359b970b64a063b243d4fc84c Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 14 Jun 2015 12:17:55 +0200 Subject: cppcheck: redundantCondition [part1] Change-Id: I21c5340e7b5ec09248b08aa76f43acf883c56cd8 --- basctl/source/basicide/basidesh.cxx | 2 +- basctl/source/basicide/basobj2.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 661a667f1034..b31d18c2607c 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -831,7 +831,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange if ( pWindow_->GetDocument().isInVBAMode() ) { SbModule* pMod = StarBASIC::GetActiveModule(); - if ( !pMod || ( pMod && ( !pMod->GetName().equals(pWindow_->GetName()) ) ) ) + if ( !pMod || !pMod->GetName().equals(pWindow_->GetName())) { bStop = false; } diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index ce19f5c3338e..1921afe4fb3c 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -382,7 +382,7 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt SbModuleRef xModule; // Only reparse modules if ScriptDocument source is out of sync // with basic's Module - if ( !pMod || ( pMod && pMod->GetSource() != aOUSource ) ) + if ( !pMod || pMod->GetSource() != aOUSource ) { xModule = new SbModule( rModName ); xModule->SetSource32( aOUSource ); @@ -432,7 +432,7 @@ bool HasMethod ( SbModuleRef xModule; // Only reparse modules if ScriptDocument source is out of sync // with basic's Module - if ( !pMod || ( pMod && pMod->GetSource() != aOUSource )) + if ( !pMod || pMod->GetSource() != aOUSource ) { xModule = new SbModule( rModName ); xModule->SetSource32( aOUSource ); -- cgit