summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-27 11:21:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-28 07:41:08 +0100
commit5e154869ea78355fccdd0774b829d89819cf2012 (patch)
tree26b86d7558bbbcd8e2319d365254684716d76b31 /sc
parent471fdea812f1ce9be349474bc3817bbb75186bba (diff)
return unique_ptr from CreateTokenMatrixMap
Change-Id: I7a779bf1b2e5438e7e5d9f75c765049d4e2b9dac Reviewed-on: https://gerrit.libreoffice.org/69856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/inc/interpre.hxx4
-rw-r--r--sc/source/core/tool/interpr4.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 1b1344164966..3fd3dcf7668c 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -454,7 +454,7 @@ private:
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2 );
inline ScTokenMatrixMap& GetTokenMatrixMap();
- static ScTokenMatrixMap* CreateTokenMatrixMap();
+ static std::unique_ptr<ScTokenMatrixMap> CreateTokenMatrixMap();
ScMatrixRef GetMatrix();
ScMatrixRef GetMatrix( short & rParam, size_t & rInRefList );
sc::RangeMatrix GetRangeMatrix();
@@ -1046,7 +1046,7 @@ inline bool ScInterpreter::MatrixParameterConversion()
inline ScTokenMatrixMap& ScInterpreter::GetTokenMatrixMap()
{
if (!pTokenMatrixMap)
- pTokenMatrixMap.reset(CreateTokenMatrixMap());
+ pTokenMatrixMap = CreateTokenMatrixMap();
return *pTokenMatrixMap;
}
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 238edf4eba9b..5713a5bd5fdc 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1434,9 +1434,9 @@ void ScInterpreter::ConvertMatrixJumpConditionToMatrix()
PushIllegalParameter();
}
-ScTokenMatrixMap* ScInterpreter::CreateTokenMatrixMap()
+std::unique_ptr<ScTokenMatrixMap> ScInterpreter::CreateTokenMatrixMap()
{
- return new ScTokenMatrixMap;
+ return std::make_unique<ScTokenMatrixMap>();
}
bool ScInterpreter::ConvertMatrixParameters()