Kaydet (Commit) bc8b3a8d authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in ScInterpreter

Change-Id: I682fa97a567ecf952214aa050a0ec981b4897ef5
Reviewed-on: https://gerrit.libreoffice.org/52028Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 63c6668f
...@@ -205,7 +205,7 @@ private: ...@@ -205,7 +205,7 @@ private:
svl::SharedStringPool& mrStrPool; svl::SharedStringPool& mrStrPool;
formula::FormulaConstTokenRef xResult; formula::FormulaConstTokenRef xResult;
ScJumpMatrix* pJumpMatrix; // currently active array condition, if any 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 ScFormulaCell* pMyFormulaCell; // the cell of this formula expression
SvNumberFormatter* pFormatter; SvNumberFormatter* pFormatter;
...@@ -1031,7 +1031,7 @@ inline bool ScInterpreter::MatrixParameterConversion() ...@@ -1031,7 +1031,7 @@ inline bool ScInterpreter::MatrixParameterConversion()
inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap() inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap()
{ {
if (!pTokenMatrixMap) if (!pTokenMatrixMap)
pTokenMatrixMap = CreateTokenMatrixMap(); pTokenMatrixMap.reset(CreateTokenMatrixMap());
return *pTokenMatrixMap; return *pTokenMatrixMap;
} }
......
...@@ -3861,7 +3861,6 @@ ScInterpreter::~ScInterpreter() ...@@ -3861,7 +3861,6 @@ ScInterpreter::~ScInterpreter()
bGlobalStackInUse = false; bGlobalStackInUse = false;
else else
delete pStackObj; delete pStackObj;
delete pTokenMatrixMap;
} }
ScCalcConfig& ScInterpreter::GetOrCreateGlobalConfig() ScCalcConfig& ScInterpreter::GetOrCreateGlobalConfig()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment