diff options
Diffstat (limited to 'sw/source/core/doc/doccomp.cxx')
-rw-r--r-- | sw/source/core/doc/doccomp.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 707d5c1a05bf..78d3fafd74a6 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -2337,7 +2337,7 @@ int CommonSubseq::FindLCS( int *pLcs1, int *pLcs2, int nStt1, int nEnd1, OSL_ASSERT( nLen1 >= 0 ); OSL_ASSERT( nLen2 >= 0 ); - int **pLcs = new int*[ nLen1 + 1 ]; + std::unique_ptr<int*[]> pLcs( new int*[ nLen1 + 1 ] ); pLcs[ 0 ] = pData.get(); for( int i = 1; i < nLen1 + 1; i++ ) @@ -2387,8 +2387,6 @@ int CommonSubseq::FindLCS( int *pLcs1, int *pLcs2, int nStt1, int nEnd1, } } - delete[] pLcs; - return nLcsLen; } |