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

Noel Grandin noel.grandin at collabora.co.uk
Mon Jan 29 06:18:17 UTC 2018


 ucb/source/ucp/ftp/ftpcontentprovider.cxx |    8 ++++----
 ucb/source/ucp/ftp/ftpcontentprovider.hxx |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 2a0c5702ca65508ce6eebeecd4560a32b97bab31
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Jan 23 15:00:16 2018 +0200

    loplugin:useuniqueptr in FTPContentProvider
    
    Change-Id: I3b5a53e274a75078534d0b7f783a7d7d107043d8
    Reviewed-on: https://gerrit.libreoffice.org/48704
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
index c74b0ae7cf10..1719d53efc47 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
@@ -47,8 +47,8 @@ FTPContentProvider::FTPContentProvider( const Reference< XComponentContext >& rx
 // virtual
 FTPContentProvider::~FTPContentProvider()
 {
-    delete m_ftpLoaderThread;
-    delete m_pProxyDecider;
+    m_ftpLoaderThread.reset();
+    m_pProxyDecider.reset();
 }
 
 // XInterface methods.
@@ -201,8 +201,8 @@ Reference<XContent> SAL_CALL FTPContentProvider::queryContent(
 
 void FTPContentProvider::init()
 {
-    m_ftpLoaderThread = new FTPLoaderThread();
-    m_pProxyDecider = new ucbhelper::InternetProxyDecider( m_xContext );
+    m_ftpLoaderThread.reset( new FTPLoaderThread() );
+    m_pProxyDecider.reset( new ucbhelper::InternetProxyDecider( m_xContext ) );
 }
 
 CURL* FTPContentProvider::handle()
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.hxx b/ucb/source/ucp/ftp/ftpcontentprovider.hxx
index f7ac598c69fc..61ab7ca64c0f 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.hxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.hxx
@@ -102,8 +102,8 @@ namespace ftp
         };
 
     private:
-        FTPLoaderThread *m_ftpLoaderThread;
-        ucbhelper::InternetProxyDecider *m_pProxyDecider;
+        std::unique_ptr<FTPLoaderThread> m_ftpLoaderThread;
+        std::unique_ptr<ucbhelper::InternetProxyDecider> m_pProxyDecider;
         std::vector<ServerInfo> m_ServerInfo;
 
         void init();


More information about the Libreoffice-commits mailing list