summaryrefslogtreecommitdiff
path: root/basic/source/classes
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2018-09-02 14:52:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-03 08:34:25 +0200
commit89b47b5eb272f26ea829dcd0fc9cd6a98160fe76 (patch)
treecf7bba4fabce9a439449db6d78d27b1779c3fad0 /basic/source/classes
parent9e28155909a5d3295e2a531731790a42fdb4c8a2 (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/source/classes')
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--basic/source/classes/sbxmod.cxx6
2 files changed, 4 insertions, 4 deletions
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 ) );
}