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:
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;
}
......
......@@ -3861,7 +3861,6 @@ ScInterpreter::~ScInterpreter()
bGlobalStackInUse = false;
else
delete pStackObj;
delete pTokenMatrixMap;
}
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