diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-09-28 15:55:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-09-28 15:55:23 +0200 |
commit | 36739d33d3dfee4bc95b546bc297015f7cb6ca00 (patch) | |
tree | 589658e0b5fc3206f50d6694ff06184c2f2def4f /sc | |
parent | 4f63a20bf96aadfd8d5a332f59b2a9835183170d (diff) |
Return the std::unique_ptr itself here, not a raw pointer
Change-Id: I00dc8c2550053235ea9ddb5fa3078b11a0be395c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 5b7dcb5a79c3..1a32289a8540 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1448,7 +1448,7 @@ inline void ColumnBatch<T>::putValues(ScMatrixRef& xMat, const SCCOL nCol) const xMat->PutDouble(&maStorage.front(), maStorage.size(), nCol, mnRowStart); } -static ScTokenArray* convertToTokenArray( +static std::unique_ptr<ScTokenArray> convertToTokenArray( ScDocument* pHostDoc, ScDocument* pSrcDoc, ScRange& rRange, vector<ScExternalRefCache::SingleRangeData>& rCacheData ) { ScAddress& s = rRange.aStart; @@ -1565,10 +1565,10 @@ static ScTokenArray* convertToTokenArray( e.SetCol(pUsedRange->aEnd.Col()); e.SetRow(pUsedRange->aEnd.Row()); - return pArray.release(); + return pArray; } -static ScTokenArray* lcl_fillEmptyMatrix(const ScRange& rRange) +static std::unique_ptr<ScTokenArray> lcl_fillEmptyMatrix(const ScRange& rRange) { SCSIZE nC = static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1); SCSIZE nR = static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1); @@ -1577,7 +1577,7 @@ static ScTokenArray* lcl_fillEmptyMatrix(const ScRange& rRange) ScMatrixToken aToken(xMat); unique_ptr<ScTokenArray> pArray(new ScTokenArray); pArray->AddToken(aToken); - return pArray.release(); + return pArray; } ScExternalRefManager::ScExternalRefManager(ScDocument* pDoc) : @@ -1749,7 +1749,7 @@ void putRangeDataIntoCache( else { // Array is empty. Fill it with an empty matrix of the required size. - pArray.reset(lcl_fillEmptyMatrix(rCacheRange)); + pArray = lcl_fillEmptyMatrix(rCacheRange); // Make sure to set this range 'cached', to prevent unnecessarily // accessing the src document time and time again. @@ -2190,7 +2190,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokensFromSr aRange.aStart.SetTab(nTab1); aRange.aEnd.SetTab(nTab1 + nTabSpan); - pArray.reset(convertToTokenArray(mpDoc, pSrcDoc, aRange, aCacheData)); + pArray = convertToTokenArray(mpDoc, pSrcDoc, aRange, aCacheData); rRange = aRange; rCacheData.swap(aCacheData); return pArray; |