diff options
author | Arnaud Versini <arnaud.versini@libreoffice.org> | 2020-11-22 16:29:04 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-22 17:53:04 +0100 |
commit | 1fdd1e8f2e91e44762b2b8017125cc1ffb00d4af (patch) | |
tree | 48921c0572a8b0448779bdfb3a6b4481980a3780 /basic | |
parent | 9d96088c2832b681ae079b29cbc977231674ad52 (diff) |
BASIC : use initialization list in constructors.
Change-Id: I651a16be0a80210504267a743b2c50474fb1cc50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106357
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/image.cxx | 22 | ||||
-rw-r--r-- | basic/source/classes/sbintern.cxx | 25 | ||||
-rw-r--r-- | basic/source/comp/buffer.cxx | 8 | ||||
-rw-r--r-- | basic/source/comp/codegen.cxx | 13 | ||||
-rw-r--r-- | basic/source/comp/scanner.cxx | 49 |
5 files changed, 60 insertions, 57 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 6ce3b8894ca9..e17b391f3d55 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -30,18 +30,18 @@ #include <memory> SbiImage::SbiImage() + : bError(false) + , nFlags(SbiImageFlags::NONE) + , nStringSize(0) + , nCodeSize(0) + , nLegacyCodeSize(0) + , nDimBase(0) + , eCharSet(osl_getThreadTextEncoding()) + , nStringIdx(0) + , nStringOff(0) + , bInit(false) + , bFirstInit(true) { - nFlags = SbiImageFlags::NONE; - nStringSize= 0; - nCodeSize = 0; - nLegacyCodeSize = - nDimBase = 0; - bInit = - bError = false; - bFirstInit = true; - eCharSet = osl_getThreadTextEncoding(); - nStringIdx = 0; - nStringOff = 0; } SbiImage::~SbiImage() diff --git a/basic/source/classes/sbintern.cxx b/basic/source/classes/sbintern.cxx index c1366801d3be..fd72949d5466 100644 --- a/basic/source/classes/sbintern.cxx +++ b/basic/source/classes/sbintern.cxx @@ -31,19 +31,20 @@ SbiGlobals* GetSbData() } SbiGlobals::SbiGlobals() + : pInst(nullptr) + , pMod(nullptr) + , pCompMod(nullptr) // JSM + , nInst(0) + , nCode(ERRCODE_NONE) + , nLine(0) + , nCol1(0) + , nCol2(0) + , bCompilerError(false) + , bGlobalInitErr(false) + , bRunInit(false) + , bBlockCompilerError(false) + , pMSOMacroRuntimLib(nullptr) { - pInst = nullptr; - pMod = nullptr; - pCompMod = nullptr; // JSM - nInst = 0; - nCode = ERRCODE_NONE; - nLine = 0; - nCol1 = nCol2 = 0; - bCompilerError = false; - bGlobalInitErr = false; - bRunInit = false; - bBlockCompilerError = false; - pMSOMacroRuntimLib = nullptr; } SbiGlobals::~SbiGlobals() = default; diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx index bbc3c351f5ae..bb7bc596ff67 100644 --- a/basic/source/comp/buffer.cxx +++ b/basic/source/comp/buffer.cxx @@ -29,14 +29,14 @@ const sal_uInt32 UP_LIMIT=0xFFFFFF00; // of x*16 Bytes. SbiBuffer::SbiBuffer( SbiParser* p, short n ) + : pParser(p) + , pCur(nullptr) + , nOff(0) + , nSize(0) { - pParser = p; n = ( (n + 15 ) / 16 ) * 16; if( !n ) n = 16; - pCur = nullptr; nInc = n; - nSize = - nOff = 0; } SbiBuffer::~SbiBuffer() diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 58e0e59c3b3e..b20d22c72078 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -37,13 +37,14 @@ // nInc is the increment size of the buffers SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc ) - : rMod( r ), aCode( p, nInc ) + : pParser(p) + , rMod(r) + , aCode(p, nInc) + , nLine(0) + , nCol(0) + , nForLevel(0) + , bStmnt(false) { - pParser = p; - bStmnt = false; - nLine = 0; - nCol = 0; - nForLevel = 0; } sal_uInt32 SbiCodeGen::GetPC() const diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 0647a72edfff..f74259d7bbbf 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -27,31 +27,32 @@ #include <svl/zforlist.hxx> #include <rtl/character.hxx> -SbiScanner::SbiScanner( const OUString& rBuf, StarBASIC* p ) : aBuf( rBuf ) +SbiScanner::SbiScanner(const OUString& rBuf, StarBASIC* p) + : aBuf(rBuf) + , nLineIdx(-1) + , nSaveLineIdx(-1) + , pBasic(p) + , eScanType(SbxVARIANT) + , nVal(0) + , nSavedCol1(0) + , nCol(0) + , nErrors(0) + , nColLock(0) + , nBufPos(0) + , nLine(0) + , nCol1(0) + , nCol2(0) + , bSymbol(false) + , bNumber(false) + , bSpaces(false) + , bAbort(false) + , bHash(true) + , bError(false) + , bCompatible(false) + , bVBASupportOn(false) + , bPrevLineExtentsComment(false) + , bInStatement(false) { - pBasic = p; - nLineIdx = -1; - nVal = 0; - eScanType = SbxVARIANT; - nErrors = 0; - nBufPos = 0; - nSavedCol1 = 0; - nColLock = 0; - nLine = 0; - nCol1 = 0; - nCol2 = 0; - nCol = 0; - bError = - bAbort = - bSpaces = - bNumber = - bSymbol = - bCompatible = - bVBASupportOn = - bInStatement = - bPrevLineExtentsComment = false; - bHash = true; - nSaveLineIdx = -1; } void SbiScanner::LockColumn() |