From 96d9bd226215194632b6b0b7b0153f41ade1fc47 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Jan 2018 11:29:36 +0200 Subject: loplugin:useuniqueptr in l10ntools update plugin to find all places where we are unconditionally deleting stuff in a destructor Change-Id: Ia0fedc2420c7717ed2bdd8d3bb00262d2a63e0bc Reviewed-on: https://gerrit.libreoffice.org/47724 Tested-by: Jenkins Reviewed-by: Noel Grandin --- l10ntools/inc/cfgmerge.hxx | 2 +- l10ntools/inc/lngmerge.hxx | 4 +--- l10ntools/inc/xrmmerge.hxx | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'l10ntools/inc') diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx index d2ec28475d39..d9ed5b6c356f 100644 --- a/l10ntools/inc/cfgmerge.hxx +++ b/l10ntools/inc/cfgmerge.hxx @@ -155,7 +155,7 @@ public: class CfgMerge : public CfgParser { private: - MergeDataFile *pMergeDataFile; + std::unique_ptr pMergeDataFile; std::vector aLanguages; std::unique_ptr pResData; diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx index 24d5b6ed211f..35c7868b01a3 100644 --- a/l10ntools/inc/lngmerge.hxx +++ b/l10ntools/inc/lngmerge.hxx @@ -28,8 +28,6 @@ #include "common.hxx" #include "export.hxx" -typedef std::vector< OString* > LngLineList; - #define LNG_OK 0x0000 #define LNG_COULD_NOT_OPEN 0x0001 @@ -43,7 +41,7 @@ typedef std::vector< OString* > LngLineList; class LngParser { private: - LngLineList *pLines; + std::vector mvLines; OString sSource; std::vector aLanguages; diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx index 0000265cac35..7d55bcd89ac7 100644 --- a/l10ntools/inc/xrmmerge.hxx +++ b/l10ntools/inc/xrmmerge.hxx @@ -104,7 +104,7 @@ public: class XRMResMerge : public XRMResParser { private: - MergeDataFile *pMergeDataFile; + std::unique_ptr pMergeDataFile; OString sFilename; std::unique_ptr pResData; std::ofstream pOutputStream; -- cgit