[Libreoffice-commits] core.git: fpicker/source

Stephan Bergmann sbergman at redhat.com
Thu Jan 26 21:00:26 UTC 2017


 fpicker/source/aqua/resourceprovider.hxx |    6 +++++-
 fpicker/source/aqua/resourceprovider.mm  |    9 +++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 63a24bfdc039224bc86733f27df6d56a3b823349
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 26 21:59:50 2017 +0100

    loplugin:useuniqueptr
    
    Change-Id: I582c1ac00bd6c9a76fca34e51be0017cdf24f035

diff --git a/fpicker/source/aqua/resourceprovider.hxx b/fpicker/source/aqua/resourceprovider.hxx
index fd6647e..63fb47e 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 51453e9..f1c9023 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 )
 {


More information about the Libreoffice-commits mailing list