Kaydet (Commit) 89a21453 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in Octree

Change-Id: I26824107dbcf5d313409e301059a37a59b59a05b
üst 9fc4f39c
......@@ -60,7 +60,7 @@ private:
NODE* pTree;
NODE* pReduce[ OCTREE_BITS + 1 ];
BitmapColor const * pColor;
ImpNodeCache* pNodeCache;
std::unique_ptr<ImpNodeCache> pNodeCache;
const BitmapReadAccess* pAcc;
sal_uInt16 nPalIndex;
......
......@@ -61,7 +61,7 @@ Octree::Octree(const BitmapReadAccess& rReadAcc, sal_uLong nColors)
, pAcc(&rReadAcc)
, nPalIndex(0)
{
pNodeCache = new ImpNodeCache( nColors );
pNodeCache.reset( new ImpNodeCache( nColors ) );
memset( pReduce, 0, ( OCTREE_BITS + 1 ) * sizeof( NODE* ) );
if( !!*pAcc )
......@@ -109,7 +109,7 @@ Octree::Octree(const BitmapReadAccess& rReadAcc, sal_uLong nColors)
Octree::~Octree()
{
ImplDeleteOctree( &pTree );
delete pNodeCache;
pNodeCache.reset();
}
void Octree::ImplDeleteOctree( NODE** ppNode )
......
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