diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-01 07:29:50 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-01 09:27:14 +0100 |
commit | 0c33e80bd0091c928be4209ff6210844ee5465a7 (patch) | |
tree | 744f3b0c44220f82cd199579b662aac1f6027841 /sd | |
parent | e9b06dd9458074af36b0fc97ff41ed4c79e5de32 (diff) |
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@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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 ) |