package/source/xstor/ocompinstream.cxx |    4 +---
 package/source/xstor/ocompinstream.hxx |    3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 4417f37dd88b9a899f070f030794594b97fe2da5
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Mon Jan 22 14:22:06 2018 +0200

    loplugin:useuniqueptr in OInputCompStream
    
    Change-Id: I49fb71aa4319f6ac245885535e8afe855113e162
    Reviewed-on: https://gerrit.libreoffice.org/48557
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/package/source/xstor/ocompinstream.cxx 
b/package/source/xstor/ocompinstream.cxx
index 06076370ea92..dd564271ecd8 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -71,8 +71,6 @@ OInputCompStream::~OInputCompStream()
         m_refCount++;
         dispose();
     }
-
-    delete m_pInterfaceContainer;
 }
 
 uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
@@ -248,7 +246,7 @@ void SAL_CALL OInputCompStream::addEventListener( const 
uno::Reference< lang::XE
     }
 
     if ( !m_pInterfaceContainer )
-        m_pInterfaceContainer = new ::comphelper::OInterfaceContainerHelper2( 
m_xMutex->GetMutex() );
+        m_pInterfaceContainer.reset( new 
::comphelper::OInterfaceContainerHelper2( m_xMutex->GetMutex() ) );
 
     m_pInterfaceContainer->addInterface( xListener );
 }
diff --git a/package/source/xstor/ocompinstream.hxx 
b/package/source/xstor/ocompinstream.hxx
index 68c2ce2262ae..c41c2c25f40a 100644
--- a/package/source/xstor/ocompinstream.hxx
+++ b/package/source/xstor/ocompinstream.hxx
@@ -31,6 +31,7 @@
 #include <comphelper/interfacecontainer2.hxx>
 #include <comphelper/refcountedmutex.hxx>
 #include <rtl/ref.hxx>
+#include <memory>
 
 
 struct OWriteStream_Impl;
@@ -44,7 +45,7 @@ protected:
     OWriteStream_Impl* m_pImpl;
     rtl::Reference<comphelper::RefCountedMutex> m_xMutex;
     css::uno::Reference < css::io::XInputStream > m_xStream;
-    ::comphelper::OInterfaceContainerHelper2* m_pInterfaceContainer;
+    std::unique_ptr<::comphelper::OInterfaceContainerHelper2> 
m_pInterfaceContainer;
     css::uno::Sequence < css::beans::PropertyValue > m_aProperties;
     bool m_bDisposed;
     sal_Int32 m_nStorageType;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to