diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-22 22:54:25 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-23 21:08:25 -0400 |
commit | bd532483b67e4fd2d1f26df545cc525de5522f10 (patch) | |
tree | ead5c1830078a73c527682cfae24617bfd2d5190 | |
parent | 68fccdc9872c1bf36b2851d58929d6cdcc2e2b2e (diff) |
Use scoped_ptr for this.
Change-Id: I54d0bbe460f95ada7632d7c9cbedb8a677995fd4
-rw-r--r-- | sc/source/core/data/table3.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 88f3ea7796c6..f39bbbe6980c 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2063,9 +2063,9 @@ void ScTable::TopTenQuery( ScQueryParam& rParam ) bSortCollatorInitialized = true; InitSortCollator( aLocalSortParam ); } - ScSortInfoArray* pArray = CreateSortInfoArray(nRow1, rParam.nRow2, bGlobalKeepQuery); - DecoladeRow( pArray, nRow1, rParam.nRow2 ); - QuickSort( pArray, nRow1, rParam.nRow2 ); + boost::scoped_ptr<ScSortInfoArray> pArray(CreateSortInfoArray(nRow1, rParam.nRow2, bGlobalKeepQuery)); + DecoladeRow( pArray.get(), nRow1, rParam.nRow2 ); + QuickSort( pArray.get(), nRow1, rParam.nRow2 ); ScSortInfo** ppInfo = pArray->GetFirstArray(); SCSIZE nValidCount = nCount; // keine Note-/Leerzellen zaehlen, sind ans Ende sortiert @@ -2142,7 +2142,6 @@ void ScTable::TopTenQuery( ScQueryParam& rParam ) rItem.meType = ScQueryEntry::ByValue; rItem.mfVal = 0; } - delete pArray; } break; default: |