diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 21:59:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 21:59:50 +0100 |
commit | 63a24bfdc039224bc86733f27df6d56a3b823349 (patch) | |
tree | 46663cb3bc6a0cec01f92f44aa09610172be2295 /fpicker | |
parent | 68155a68578a0f4066c1c566c2d378bbae05c216 (diff) |
loplugin:useuniqueptr
Change-Id: I582c1ac00bd6c9a76fca34e51be0017cdf24f035
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/aqua/resourceprovider.hxx | 6 | ||||
-rw-r--r-- | fpicker/source/aqua/resourceprovider.mm | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/fpicker/source/aqua/resourceprovider.hxx b/fpicker/source/aqua/resourceprovider.hxx index fd6647eabeb4..63fb47e8ad5f 100644 --- a/fpicker/source/aqua/resourceprovider.hxx +++ b/fpicker/source/aqua/resourceprovider.hxx @@ -21,6 +21,10 @@ #ifndef INCLUDED_FPICKER_SOURCE_AQUA_RESOURCEPROVIDER_HXX #define INCLUDED_FPICKER_SOURCE_AQUA_RESOURCEPROVIDER_HXX +#include <sal/config.h> + +#include <memory> + #include <sal/types.h> #include <premac.h> @@ -45,7 +49,7 @@ public: NSString* getResString( sal_Int32 aId ); private: - CResourceProvider_Impl* m_pImpl; + std::unique_ptr<CResourceProvider_Impl> m_pImpl; }; #endif diff --git a/fpicker/source/aqua/resourceprovider.mm b/fpicker/source/aqua/resourceprovider.mm index 51453e986a77..f1c9023a1cfd 100644 --- a/fpicker/source/aqua/resourceprovider.mm +++ b/fpicker/source/aqua/resourceprovider.mm @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <o3tl/make_unique.hxx> #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> #include <osl/mutex.hxx> @@ -155,14 +158,12 @@ public: }; CResourceProvider::CResourceProvider( ) : - m_pImpl( new CResourceProvider_Impl() ) + m_pImpl( o3tl::make_unique<CResourceProvider_Impl>() ) { } CResourceProvider::~CResourceProvider( ) -{ - delete m_pImpl; -} +{} NSString* CResourceProvider::getResString( sal_Int32 aId ) { |