diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-05 09:46:12 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-06 06:48:38 +0000 |
commit | f3d9aab8410c00298f29ca0194c5d33d53c63ff2 (patch) | |
tree | 370d24d49547d8eb2cdbcb293992d9b9a4a670ed /basic | |
parent | 654c98064d3fd2bd1e13ae2bda5f84e8d51d0071 (diff) |
teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref.
Suggested by Tor Lillqvist
Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/codecompletecache.cxx | 12 | ||||
-rw-r--r-- | basic/source/comp/parser.cxx | 2 | ||||
-rw-r--r-- | basic/source/inc/parser.hxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxvalue.cxx | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx index 4c973107b0db..0ea913a9c1d3 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -42,7 +42,7 @@ bool CodeCompleteOptions::IsCodeCompleteOn() return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsCodeCompleteOn; } -void CodeCompleteOptions::SetCodeCompleteOn( const bool& b ) +void CodeCompleteOptions::SetCodeCompleteOn( bool b ) { theCodeCompleteOptions::get().bIsCodeCompleteOn = b; } @@ -52,7 +52,7 @@ bool CodeCompleteOptions::IsExtendedTypeDeclaration() return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bExtendedTypeDeclarationOn; } -void CodeCompleteOptions::SetExtendedTypeDeclaration( const bool& b ) +void CodeCompleteOptions::SetExtendedTypeDeclaration( bool b ) { theCodeCompleteOptions::get().bExtendedTypeDeclarationOn = b; } @@ -62,7 +62,7 @@ bool CodeCompleteOptions::IsProcedureAutoCompleteOn() return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn; } -void CodeCompleteOptions::SetProcedureAutoCompleteOn( const bool& b ) +void CodeCompleteOptions::SetProcedureAutoCompleteOn( bool b ) { theCodeCompleteOptions::get().bIsProcedureAutoCompleteOn = b; } @@ -72,7 +72,7 @@ bool CodeCompleteOptions::IsAutoCloseQuotesOn() return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseQuotesOn; } -void CodeCompleteOptions::SetAutoCloseQuotesOn( const bool& b ) +void CodeCompleteOptions::SetAutoCloseQuotesOn( bool b ) { theCodeCompleteOptions::get().bIsAutoCloseQuotesOn = b; } @@ -82,7 +82,7 @@ bool CodeCompleteOptions::IsAutoCloseParenthesisOn() return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn; } -void CodeCompleteOptions::SetAutoCloseParenthesisOn( const bool& b ) +void CodeCompleteOptions::SetAutoCloseParenthesisOn( bool b ) { theCodeCompleteOptions::get().bIsAutoCloseParenthesisOn = b; } @@ -92,7 +92,7 @@ bool CodeCompleteOptions::IsAutoCorrectOn() return theCodeCompleteOptions::get().aMiscOptions.IsExperimentalMode() && theCodeCompleteOptions::get().bIsAutoCorrectOn; } -void CodeCompleteOptions::SetAutoCorrectOn( const bool& b ) +void CodeCompleteOptions::SetAutoCorrectOn( bool b ) { theCodeCompleteOptions::get().bIsAutoCorrectOn = b; } diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 87af41228bce..477c30d4fe93 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -310,7 +310,7 @@ void SbiParser::StmntBlock( SbiToken eEnd ) } } -void SbiParser::SetCodeCompleting( const bool& b ) +void SbiParser::SetCodeCompleting( bool b ) { bCodeCompleting = b; } diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx index fa60d6d1ca4e..b2a44dbb5912 100644 --- a/basic/source/inc/parser.hxx +++ b/basic/source/inc/parser.hxx @@ -81,7 +81,7 @@ public: SbiParser( StarBASIC*, SbModule* ); bool Parse(); - void SetCodeCompleting( const bool& b ); + void SetCodeCompleting( bool b ); bool IsCodeCompleting() const { return bCodeCompleting;} SbiExprNode* GetWithVar(); diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index aaf3030eb89e..c58e0b910ca2 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -688,7 +688,7 @@ void SbxValue::PutErr( sal_uInt16 n ) PUT( PutByte, SbxBYTE, sal_uInt8, nByte ) PUT( PutChar, SbxCHAR, sal_Unicode, nChar ) -PUT( PutCurrency, SbxCURRENCY, const sal_Int64&, nInt64 ) +PUT( PutCurrency, SbxCURRENCY, sal_Int64, nInt64 ) PUT( PutDouble, SbxDOUBLE, double, nDouble ) PUT( PutInteger, SbxINTEGER, sal_Int16, nInteger ) PUT( PutLong, SbxLONG, sal_Int32, nLong ) |