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 /include | |
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 'include')
-rw-r--r-- | include/basic/codecompletecache.hxx | 12 | ||||
-rw-r--r-- | include/basic/sbxvar.hxx | 2 | ||||
-rw-r--r-- | include/connectivity/FValue.hxx | 22 | ||||
-rw-r--r-- | include/svx/framelink.hxx | 8 | ||||
-rw-r--r-- | include/tools/datetime.hxx | 2 | ||||
-rw-r--r-- | include/ucbhelper/simplecertificatevalidationrequest.hxx | 2 | ||||
-rw-r--r-- | include/vcl/lstbox.hxx | 2 | ||||
-rw-r--r-- | include/vcl/quickselectionengine.hxx | 2 |
8 files changed, 26 insertions, 26 deletions
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx index 591daf9186a0..07e6c37f3e43 100644 --- a/include/basic/codecompletecache.hxx +++ b/include/basic/codecompletecache.hxx @@ -52,22 +52,22 @@ public: CodeCompleteOptions(); static bool IsCodeCompleteOn(); - static void SetCodeCompleteOn( const bool& b ); + static void SetCodeCompleteOn( bool b ); static bool IsExtendedTypeDeclaration(); - static void SetExtendedTypeDeclaration( const bool& b ); + static void SetExtendedTypeDeclaration( bool b ); static bool IsProcedureAutoCompleteOn(); - static void SetProcedureAutoCompleteOn( const bool& b ); + static void SetProcedureAutoCompleteOn( bool b ); static bool IsAutoCloseQuotesOn(); - static void SetAutoCloseQuotesOn( const bool& b ); + static void SetAutoCloseQuotesOn( bool b ); static bool IsAutoCloseParenthesisOn(); - static void SetAutoCloseParenthesisOn( const bool& b ); + static void SetAutoCloseParenthesisOn( bool b ); static bool IsAutoCorrectOn(); - static void SetAutoCorrectOn( const bool& b ); + static void SetAutoCorrectOn( bool b ); }; class BASIC_DLLPUBLIC CodeCompleteDataCache diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 489212184057..13178fa188bc 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -176,7 +176,7 @@ public: void PutDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ); bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove void fillAutomationDecimal( css::bridge::oleautomation::Decimal& rAutomationDec ) const; - bool PutCurrency( const sal_Int64& ); + bool PutCurrency( sal_Int64 ); // Interface for CDbl in Basic static SbxError ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle = false ); diff --git a/include/connectivity/FValue.hxx b/include/connectivity/FValue.hxx index c78f3c76b8c5..a25989c21fe4 100644 --- a/include/connectivity/FValue.hxx +++ b/include/connectivity/FValue.hxx @@ -288,22 +288,22 @@ namespace connectivity ORowSetValue& operator=(const ORowSetValue& _rRH); // simple types - ORowSetValue& operator=(const bool _rRH); + ORowSetValue& operator=(bool _rRH); - ORowSetValue& operator=(const sal_Int8& _rRH); - ORowSetValue& operator=(const sal_uInt8& _rRH); + ORowSetValue& operator=(sal_Int8 _rRH); + ORowSetValue& operator=(sal_uInt8 _rRH); - ORowSetValue& operator=(const sal_Int16& _rRH); - ORowSetValue& operator=(const sal_uInt16& _rRH); + ORowSetValue& operator=(sal_Int16 _rRH); + ORowSetValue& operator=(sal_uInt16 _rRH); - ORowSetValue& operator=(const sal_Int32& _rRH); - ORowSetValue& operator=(const sal_uInt32& _rRH); + ORowSetValue& operator=(sal_Int32 _rRH); + ORowSetValue& operator=(sal_uInt32 _rRH); - ORowSetValue& operator=(const sal_Int64& _rRH); - ORowSetValue& operator=(const sal_uInt64& _rRH); + ORowSetValue& operator=(sal_Int64 _rRH); + ORowSetValue& operator=(sal_uInt64 _rRH); - ORowSetValue& operator=(const double& _rRH); - ORowSetValue& operator=(const float& _rRH); + ORowSetValue& operator=(double _rRH); + ORowSetValue& operator=(float _rRH); // ADT's ORowSetValue& operator=(const css::util::Date& _rRH); diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx index adc16dbae326..e7ac85c3b7d4 100644 --- a/include/svx/framelink.hxx +++ b/include/svx/framelink.hxx @@ -447,8 +447,8 @@ SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimit const DiagStyle& rRFromBL, /// Diagonal frame border from bottom-left to right end of rBorder. const Color* pForceColor = nullptr,/// If specified, overrides frame border color. - const long& rRotationT = 9000, /// Angle of the top slanted frames in 100th of degree - const long& rRotationB = 9000 /// Angle of the bottom slanted frames in 100th of degree + const long rRotationT = 9000, /// Angle of the top slanted frames in 100th of degree + const long rRotationB = 9000 /// Angle of the bottom slanted frames in 100th of degree ); SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimitives( @@ -465,8 +465,8 @@ SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimit const Style& rRFromB, /// Vertical frame border from bottom to right end of rBorder. const Color* pForceColor = nullptr,/// If specified, overrides frame border color. - const long& rRotationT = 9000, /// Angle of the top slanted frame in 100th of degrees - const long& rRotationB = 9000 /// Angle of the bottom slanted frame in 100th of degrees + const long rRotationT = 9000, /// Angle of the top slanted frame in 100th of degrees + const long rRotationB = 9000 /// Angle of the bottom slanted frame in 100th of degrees ); SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateClippedBorderPrimitives ( diff --git a/include/tools/datetime.hxx b/include/tools/datetime.hxx index 228ac4ea9a8e..66826dff58e1 100644 --- a/include/tools/datetime.hxx +++ b/include/tools/datetime.hxx @@ -105,7 +105,7 @@ public: DateTime& operator =( const DateTime& rDateTime ); void GetWin32FileDateTime( sal_uInt32 & rLower, sal_uInt32 & rUpper ); - static DateTime CreateFromWin32FileDateTime( const sal_uInt32 & rLower, const sal_uInt32 & rUpper ); + static DateTime CreateFromWin32FileDateTime( sal_uInt32 rLower, sal_uInt32 rUpper ); }; inline DateTime& DateTime::operator =( const DateTime& rDateTime ) diff --git a/include/ucbhelper/simplecertificatevalidationrequest.hxx b/include/ucbhelper/simplecertificatevalidationrequest.hxx index c78115e0a31d..e59f9da8aec2 100644 --- a/include/ucbhelper/simplecertificatevalidationrequest.hxx +++ b/include/ucbhelper/simplecertificatevalidationrequest.hxx @@ -51,7 +51,7 @@ public: * @param lCertificateValidity contains a bitmask which validation error occur. * @param pCertificate contains the server certificate. */ - SimpleCertificateValidationRequest( const sal_Int32 & lCertificateValidity, + SimpleCertificateValidationRequest( sal_Int32 lCertificateValidity, const css::uno::Reference<css::security::XCertificate>& certificate, const OUString & hostname ); }; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 3276e3eaa667..c480e46d4e25 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -271,7 +271,7 @@ public: virtual bool set_property(const OString &rKey, const OString &rValue) override; - void EnableQuickSelection( const bool& b ); + void EnableQuickSelection( bool b ); static sal_Int32 NaturalSortCompare(const OUString &rA, const OUString &rB); }; diff --git a/include/vcl/quickselectionengine.hxx b/include/vcl/quickselectionengine.hxx index 2eba2495481f..daa6bee44c22 100644 --- a/include/vcl/quickselectionengine.hxx +++ b/include/vcl/quickselectionengine.hxx @@ -73,7 +73,7 @@ namespace vcl bool HandleKeyEvent( const KeyEvent& _rKEvt ); void Reset(); - void SetEnabled( const bool& b ); + void SetEnabled( bool b ); private: ::std::unique_ptr< QuickSelectionEngine_Data > m_pData; |