summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-05 15:04:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-11 08:42:59 +0200
commit347912f6829990983dba8851e57a36ab96fa4f83 (patch)
tree0431bed6a86a2b7f7115fe8b79a92159bbe92916 /sc
parent9457326e17505c9a17f40b2f932b21a4436eeae1 (diff)
initialise ScMatrix once instead of twice
initialise the mdds matrix inside ScJumpMatrix once instead of twice Change-Id: Ic6883418d965a093c76ab5dbf4c8780c174f10bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96067 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/jumpmatrix.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/core/tool/jumpmatrix.cxx b/sc/source/core/tool/jumpmatrix.cxx
index f66a82abeba7..517447b3ae2d 100644
--- a/sc/source/core/tool/jumpmatrix.cxx
+++ b/sc/source/core/tool/jumpmatrix.cxx
@@ -29,7 +29,10 @@ const SCSIZE kBufferThreshold = 128;
ScJumpMatrix::ScJumpMatrix( OpCode eOp, SCSIZE nColsP, SCSIZE nRowsP )
: mvJump(nColsP * nRowsP)
- , pMat(new ScMatrix(nColsP, nRowsP))
+ // Initialize result matrix in case of
+ // a premature end of the interpreter
+ // due to errors.
+ , pMat(new ScMatrix(nColsP, nRowsP, CreateDoubleError(FormulaError::NotAvailable)))
, nCols(nColsP)
, nRows(nRowsP)
, nCurCol(0)
@@ -43,10 +46,6 @@ ScJumpMatrix::ScJumpMatrix( OpCode eOp, SCSIZE nColsP, SCSIZE nRowsP )
, mnBufferEmptyCount(0)
, mnBufferEmptyPathCount(0)
{
- // Initialize result matrix in case of
- // a premature end of the interpreter
- // due to errors.
- pMat->FillDouble(CreateDoubleError(FormulaError::NotAvailable), 0, 0, nCols - 1, nRows - 1);
/*! pJump not initialized */
}