[Libreoffice-commits] core.git: basic/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 3 06:34:45 UTC 2018
basic/source/basmgr/basmgr.cxx | 9 ++++-----
basic/source/classes/sbunoobj.cxx | 2 +-
basic/source/classes/sbxmod.cxx | 6 +++---
basic/source/sbx/sbxdec.cxx | 6 +++---
4 files changed, 11 insertions(+), 12 deletions(-)
New commits:
commit 89b47b5eb272f26ea829dcd0fc9cd6a98160fe76
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
AuthorDate: Sun Sep 2 14:52:11 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Sep 3 08:34:25 2018 +0200
cppcheck: useInitializationList in basic
Change-Id: I97fefc25076c2c163f6010745081772ee8c17712
Reviewed-on: https://gerrit.libreoffice.org/59908
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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
More information about the Libreoffice-commits
mailing list