basic/source/comp/parser.cxx     |   23 +++++++++++------------
 basic/source/runtime/runtime.cxx |    4 ++--
 2 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 0f98bcdf4d47193fa0fe38a5fc04218bdbb7d886
Author:     Arnaud Versini <arnaud.vers...@libreoffice.org>
AuthorDate: Sat Oct 9 20:54:09 2021 +0200
Commit:     Arnaud Versini <arnaud.vers...@libreoffice.org>
CommitDate: Sun Oct 17 21:25:44 2021 +0200

    basic: simplifiy class initialization
    
    Change-Id: I87fa2f606011aab8e34d9445d9e9299786f05747
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123324
    Tested-by: Jenkins
    Reviewed-by: Arnaud Versini <arnaud.vers...@libreoffice.org>

diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index dc0b3b16b348..777db4071615 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -115,24 +115,23 @@ const SbiStatement StmntTable [] = {
 { NIL, nullptr, N, N }
 };
 
-
 SbiParser::SbiParser( StarBASIC* pb, SbModule* pm )
         : SbiTokenizer( pm->GetSource32(), pb ),
+          pStack(nullptr),
+          pProc(nullptr),
+          pWithVar(nullptr),
+          eEndTok(NIL),
+          bGblDefs(false),
+          bNewGblDefs(false),
+          bSingleLineIf(false),
+          bCodeCompleting(false),
           aGlobals( aGblStrings, SbGLOBAL, this ),
           aPublics( aGblStrings, SbPUBLIC, this ),
           aRtlSyms( aGblStrings, SbRTL, this ),
-          aGen( *pm, this )
+          aGen( *pm, this ),
+          nBase(0),
+          bExplicit(false)
 {
-    eEndTok  = NIL;
-    pProc    = nullptr;
-    pStack   = nullptr;
-    pWithVar = nullptr;
-    nBase    = 0;
-    bGblDefs =
-    bNewGblDefs =
-    bSingleLineIf =
-    bCodeCompleting =
-    bExplicit = false;
     bClassModule = ( pm->GetModuleType() == css::script::ModuleType::CLASS );
     pPool    = &aPublics;
     for(SbxDataType & eDefType : eDefTypes)
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 5c27b84223f7..2d7b988d7647 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -290,9 +290,9 @@ const SbiRuntime::pStep2 SbiRuntime::aStep2[] = {// all 
opcodes with two operand
 //                              SbiRTLData
 
 SbiRTLData::SbiRTLData()
+    : nDirFlags(SbAttributes::NONE)
+    , nCurDirPos(0)
 {
-    nDirFlags   = SbAttributes::NONE;
-    nCurDirPos  = 0;
 }
 
 SbiRTLData::~SbiRTLData()

Reply via email to