diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-09-02 14:52:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-03 08:34:25 +0200 |
commit | 89b47b5eb272f26ea829dcd0fc9cd6a98160fe76 (patch) | |
tree | cf7bba4fabce9a439449db6d78d27b1779c3fad0 /basic | |
parent | 9e28155909a5d3295e2a531731790a42fdb4c8a2 (diff) |
cppcheck: useInitializationList in basic
Change-Id: I97fefc25076c2c163f6010745081772ee8c17712
Reviewed-on: https://gerrit.libreoffice.org/59908
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 9 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 6 | ||||
-rw-r--r-- | basic/source/sbx/sbxdec.cxx | 6 |
4 files changed, 11 insertions, 12 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index e4841ce100e9..8318466c88f1 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -384,12 +384,11 @@ public: BasicLibInfo::BasicLibInfo() + : aStorageName(szImbedded) + , aRelStorageName(szImbedded) + , bDoLoad(false) + , bReference(false) { - bReference = false; - bDoLoad = false; - mxScriptCont = nullptr; - aStorageName = szImbedded; - aRelStorageName = szImbedded; } BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream ) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index ddf92c07638b..376bae1217b7 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4407,8 +4407,8 @@ struct StarBasicDisposeItem explicit StarBasicDisposeItem( StarBASIC* pBasic ) : m_pBasic( pBasic ) + , m_pRegisteredVariables(new SbxArray()) { - m_pRegisteredVariables = new SbxArray(); } }; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index fd6713b6eb49..51bb267c7060 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1665,10 +1665,10 @@ class ErrorHdlResetter Link<StarBASIC*,bool> mErrHandler; bool mbError; public: - ErrorHdlResetter() : mbError( false ) + ErrorHdlResetter() + : mErrHandler(StarBASIC::GetGlobalErrorHdl()) // save error handler + , mbError( false ) { - // save error handler - mErrHandler = StarBASIC::GetGlobalErrorHdl(); // set new error handler StarBASIC::SetGlobalErrorHdl( LINK( this, ErrorHdlResetter, BasicErrorHdl ) ); } diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 4c9be3546afd..c71b031df2be 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -29,23 +29,24 @@ // Implementation SbxDecimal SbxDecimal::SbxDecimal() + : mnRefCount(0) { setInt( 0 ); - mnRefCount = 0; } SbxDecimal::SbxDecimal( const SbxDecimal& rDec ) + : mnRefCount(0) { #ifdef _WIN32 maDec = rDec.maDec; #else (void)rDec; #endif - mnRefCount = 0; } SbxDecimal::SbxDecimal ( const css::bridge::oleautomation::Decimal& rAutomationDec ) + : mnRefCount(0) { #ifdef _WIN32 maDec.scale = rAutomationDec.Scale; @@ -56,7 +57,6 @@ SbxDecimal::SbxDecimal #else (void)rAutomationDec; #endif - mnRefCount = 0; } void SbxDecimal::fillAutomationDecimal |