diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 15:06:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-04 10:34:46 +0200 |
commit | 2fc4af37bf321619cb6bd67cd051856301c7e074 (patch) | |
tree | 4f32c38b2351d1e89e50ad3e621f9091c0f474ed /sw/source | |
parent | 97164f87696ab703c03e530d4071a55381d51cc1 (diff) |
loplugin:useuniqueptr in DocumentStatisticsManager
Change-Id: I71563287c05c0ffa9dc596b6f6e02431b13e693c
Reviewed-on: https://gerrit.libreoffice.org/52346
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/DocumentStatisticsManager.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/inc/DocumentStatisticsManager.hxx | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx index 135fcb50f782..0b8003283fb0 100644 --- a/sw/source/core/doc/DocumentStatisticsManager.cxx +++ b/sw/source/core/doc/DocumentStatisticsManager.cxx @@ -248,7 +248,6 @@ IMPL_LINK( DocumentStatisticsManager, DoIdleStatsUpdate, Timer *, pIdle, void ) DocumentStatisticsManager::~DocumentStatisticsManager() { maStatsUpdateIdle.Stop(); - delete mpDocStat; } } diff --git a/sw/source/core/inc/DocumentStatisticsManager.hxx b/sw/source/core/inc/DocumentStatisticsManager.hxx index 41b961f9cae5..6767d4b10cc5 100644 --- a/sw/source/core/inc/DocumentStatisticsManager.hxx +++ b/sw/source/core/inc/DocumentStatisticsManager.hxx @@ -60,7 +60,7 @@ private: // Our own 'StatsUpdateTimer' calls the following method DECL_LINK( DoIdleStatsUpdate, Timer *, void ); - SwDocStat *mpDocStat; //< Statistics information + std::unique_ptr<SwDocStat> mpDocStat;//< Statistics information bool mbInitialized; //< allow first time update SwDocIdle maStatsUpdateIdle; //< Idle for asynchronous stats calculation }; |