From 7b99cdb2d77a3feaf9b782c1e656f2d922e2746e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 5 Nov 2019 15:20:22 +0200 Subject: loplugin:indentation find broken if statements so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/basmgr/basmgr.cxx | 2 +- basic/source/comp/io.cxx | 22 +++++++++++----------- basic/source/sbx/sbxconv.hxx | 9 ++++++--- 3 files changed, 18 insertions(+), 15 deletions(-) (limited to 'basic') diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index f0a7b38730a2..a2e59d8b4213 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -197,7 +197,7 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager const * pM pLib->MakeModule( aModuleName, aInfo, aMod ); } else - pLib->MakeModule( aModuleName, aMod ); + pLib->MakeModule( aModuleName, aMod ); } pLib->SetModified( false ); diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx index d1abbee9c330..3a24d4141027 100644 --- a/basic/source/comp/io.cxx +++ b/basic/source/comp/io.cxx @@ -290,18 +290,18 @@ void SbiParser::Close() if( IsEoln( eCurTok ) ) aGen.Gen( SbiOpcode::CLOSE_, 0 ); else - for( ;; ) - { - SbiExpression aExpr( this ); - while( Peek() == COMMA || Peek() == SEMICOLON ) - Next(); - aExpr.Gen(); - aGen.Gen( SbiOpcode::CHANNEL_ ); - aGen.Gen( SbiOpcode::CLOSE_, 1 ); + for( ;; ) + { + SbiExpression aExpr( this ); + while( Peek() == COMMA || Peek() == SEMICOLON ) + Next(); + aExpr.Gen(); + aGen.Gen( SbiOpcode::CHANNEL_ ); + aGen.Gen( SbiOpcode::CLOSE_, 1 ); - if( IsEoln( Peek() ) ) - break; - } + if( IsEoln( Peek() ) ) + break; + } } diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx index 8a8fd98a7a6d..378c752b88d9 100644 --- a/basic/source/sbx/sbxconv.hxx +++ b/basic/source/sbx/sbxconv.hxx @@ -70,9 +70,12 @@ sal_Int64 ImpGetCurrency( const SbxValues* ); void ImpPutCurrency( SbxValues*, const sal_Int64 ); inline sal_Int64 ImpDoubleToCurrency( double d ) - { if (d > 0) return static_cast( d * CURRENCY_FACTOR + 0.5); - else return static_cast( d * CURRENCY_FACTOR - 0.5); - } +{ + if (d > 0) + return static_cast( d * CURRENCY_FACTOR + 0.5); + else + return static_cast( d * CURRENCY_FACTOR - 0.5); +} inline double ImpCurrencyToDouble( const sal_Int64 r ) { return static_cast(r) / double(CURRENCY_FACTOR); } -- cgit v1.2.3