Skip to content

Commit

Permalink
Replace reset/release by std::move for unique_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 1a24af1 commit 38e5301
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/qgsproject.cpp
Expand Up @@ -858,10 +858,9 @@ bool QgsProject::readProjectFile( const QString &filename )

// start new project, just keep the file name and auxiliary storage
QString fileName = mFile.fileName();
std::unique_ptr<QgsAuxiliaryStorage> aStorage;
aStorage.reset( mAuxiliaryStorage.release() );
std::unique_ptr<QgsAuxiliaryStorage> aStorage = std::move( mAuxiliaryStorage );
clear();
mAuxiliaryStorage.reset( aStorage.release() );
mAuxiliaryStorage = std::move( aStorage );
mFile.setFileName( fileName );

// now get any properties
Expand Down

0 comments on commit 38e5301

Please sign in to comment.