summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-19 11:25:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-19 12:53:34 +0200
commit2e51afc77c0800dda6c09bb645d8962ae125b2ba (patch)
tree087dc79cce1eaeedb9556be0953bdda2e8954560 /basic/source/comp
parent575b457d728531a1cfff95d2eea1887e09d79009 (diff)
loplugin:comparisonwithconstant in basic
Change-Id: Ie34a17d2fb465ffbe675ba4e99917d23959f1fb5 Reviewed-on: https://gerrit.libreoffice.org/37809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/codegen.cxx2
-rw-r--r--basic/source/comp/exprgen.cxx2
-rw-r--r--basic/source/comp/sbcomp.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index a3acf6732b9f..fee812fead44 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -205,7 +205,7 @@ void SbiCodeGen::Save()
{
const OUString& rIfaceName = pParser->aIfaceVector[i];
int nFound = aPureProcName.indexOf( rIfaceName );
- if( nFound == 0 && '_' == aPureProcName[rIfaceName.getLength()] )
+ if( nFound == 0 && aPureProcName[rIfaceName.getLength()] == '_' )
{
if( nPropPrefixFound == 0 )
{
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index 1b0638881bce..befb063cdde2 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -87,7 +87,7 @@ void SbiExprNode::Gen( SbiCodeGen& rGen, RecursiveMode eRecMode )
if( aVar.pDef->GetScope() == SbPARAM )
{
eOp = SbiOpcode::PARAM_;
- if( 0 == aVar.pDef->GetPos() )
+ if( aVar.pDef->GetPos() == 0 )
{
bool bTreatFunctionAsParam = true;
if( eRecMode == FORCE_CALL )
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index bdddbc4e2ec6..6e1bf2a8f8bc 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -58,7 +58,7 @@ bool SbModule::Compile()
bool bRet = IsCompiled();
if( bRet )
{
- if( nullptr == dynamic_cast<const SbObjModule*>( this) )
+ if( dynamic_cast<const SbObjModule*>( this) == nullptr )
pBasic->ClearAllModuleVars();
RemoveVars(); // remove 'this' Modules variables
// clear all method statics