diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/inc/interpre.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 8f68245f99d7..71bf46a80c50 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -205,7 +205,7 @@ private: svl::SharedStringPool& mrStrPool; formula::FormulaConstTokenRef xResult; ScJumpMatrix* pJumpMatrix; // currently active array condition, if any - ScTokenMatrixMap* pTokenMatrixMap; // map FormulaToken* to formula::FormulaTokenRef if in array condition + std::unique_ptr<ScTokenMatrixMap> pTokenMatrixMap; // map FormulaToken* to formula::FormulaTokenRef if in array condition ScFormulaCell* pMyFormulaCell; // the cell of this formula expression SvNumberFormatter* pFormatter; @@ -1031,7 +1031,7 @@ inline bool ScInterpreter::MatrixParameterConversion() inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap() { if (!pTokenMatrixMap) - pTokenMatrixMap = CreateTokenMatrixMap(); + pTokenMatrixMap.reset(CreateTokenMatrixMap()); return *pTokenMatrixMap; } diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index f3e855f04828..b6f55e7bb7bc 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3861,7 +3861,6 @@ ScInterpreter::~ScInterpreter() bGlobalStackInUse = false; else delete pStackObj; - delete pTokenMatrixMap; } ScCalcConfig& ScInterpreter::GetOrCreateGlobalConfig() |