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

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


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

New commits:
commit 0c33e80bd0091c928be4209ff6210844ee5465a7
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Nov 1 07:29:50 2018 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Nov 1 09:27:14 2018 +0100

    Limit the unique_ptr scope to get rid of .reset()
    
    Change-Id: I5d852f4d7f5de24ff49eaada6f53cd197ee2d0f7
    Reviewed-on: https://gerrit.libreoffice.org/62715
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

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


More information about the Libreoffice-commits mailing list