basic/source/inc/runtime.hxx | 6 +++--- basic/source/runtime/runtime.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 4be5308c05d8078b20fc9b14d961c53b0ede193a Author: Arnaud Versini <arnaud.vers...@libreoffice.org> AuthorDate: Sat Dec 26 13:46:52 2020 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Dec 27 07:52:20 2020 +0100 BASIC : SbiRuntime static data should be const Change-Id: If8c221a2bfb249a6625df4b466fe5247b7a8ae72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108355 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 3262dec7ce0d..1169820e753b 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -208,9 +208,9 @@ class SbiRuntime typedef void( SbiRuntime::*pStep0 )(); typedef void( SbiRuntime::*pStep1 )( sal_uInt32 nOp1 ); typedef void( SbiRuntime::*pStep2 )( sal_uInt32 nOp1, sal_uInt32 nOp2 ); - static pStep0 aStep0[]; // opcode-table group 0 - static pStep1 aStep1[]; - static pStep2 aStep2[]; + static const pStep0 aStep0[]; // opcode-table group 0 + static const pStep1 aStep1[]; + static const pStep2 aStep2[]; StarBASIC& rBasic; // StarBASIC instance SbiInstance* pInst; // current thread diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 3ceaf38cafc7..aecf2f7f9a3d 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -157,7 +157,7 @@ struct SbiGosub { // GOSUB-Stack: nStartForLvl(nStartForLvl_) {} }; -SbiRuntime::pStep0 SbiRuntime::aStep0[] = { // all opcodes without operands +const SbiRuntime::pStep0 SbiRuntime::aStep0[] = { // all opcodes without operands &SbiRuntime::StepNOP, &SbiRuntime::StepEXP, &SbiRuntime::StepMUL, @@ -226,7 +226,7 @@ SbiRuntime::pStep0 SbiRuntime::aStep0[] = { // all opcodes without operands &SbiRuntime::StepBYVAL, // access TOS as array }; -SbiRuntime::pStep1 SbiRuntime::aStep1[] = { // all opcodes with one operand +const SbiRuntime::pStep1 SbiRuntime::aStep1[] = { // all opcodes with one operand &SbiRuntime::StepLOADNC, // loading a numeric constant (+ID) &SbiRuntime::StepLOADSC, // loading a string constant (+ID) &SbiRuntime::StepLOADI, // Immediate Load (+value) @@ -255,7 +255,7 @@ SbiRuntime::pStep1 SbiRuntime::aStep1[] = { // all opcodes with one operand &SbiRuntime::StepVBASETCLASS,// vba-like set statement }; -SbiRuntime::pStep2 SbiRuntime::aStep2[] = {// all opcodes with two operands +const SbiRuntime::pStep2 SbiRuntime::aStep2[] = {// all opcodes with two operands &SbiRuntime::StepRTL, // load from RTL (+StringID+Typ) &SbiRuntime::StepFIND, // load (+StringID+Typ) &SbiRuntime::StepELEM, // load element (+StringID+Typ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits