summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@libreoffice.org>2021-10-09 20:54:09 +0200
committerArnaud Versini <arnaud.versini@libreoffice.org>2021-10-17 21:25:44 +0200
commit0f98bcdf4d47193fa0fe38a5fc04218bdbb7d886 (patch)
treeb60579afcefdb6a3dae3ecfae459b3f077fa5cb9 /basic/source
parent1d1d0bd4d941c58306f3086cf3103b40ad0978ba (diff)
basic: simplifiy class initialization
Change-Id: I87fa2f606011aab8e34d9445d9e9299786f05747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123324 Tested-by: Jenkins Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/comp/parser.cxx23
-rw-r--r--basic/source/runtime/runtime.cxx4
2 files changed, 13 insertions, 14 deletions
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()