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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 1 05:47:08 UTC 2018


 sd/source/filter/ppt/pptin.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 98718dc375df991afe8136a48b9ec11051f58054
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 30 14:25:39 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 1 06:46:38 2018 +0100

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

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 4724a6f3df70..5f19b38cdd2b 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -137,11 +137,11 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
     pSummaryInformation.reset();
 #endif
 
-    SvStream* pCurrentUserStream = rStorage.OpenSotStream( "Current User", StreamMode::STD_READ );
+    std::unique_ptr<SvStream> pCurrentUserStream(rStorage.OpenSotStream( "Current User", StreamMode::STD_READ ));
     if( pCurrentUserStream )
     {
         ReadPptCurrentUserAtom(*pCurrentUserStream, maParam.aCurrentUserAtom);
-        delete pCurrentUserStream;
+        pCurrentUserStream.reset();
     }
 
     if( pDocument )


More information about the Libreoffice-commits mailing list