Skip to content

Commit

Permalink
Use std::move to reassign unique_ptrs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 11, 2017
1 parent 68ad9fe commit 7855849
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2141,7 +2141,7 @@ bool QgsProject::unzip( const QString &filename )
}

// keep the archive and remove the temporary .qgs file
mArchive.reset( archive.release() );
mArchive = std::move( archive );
mArchive->clearProjectFile();

return true;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology/qgsdatadefinedsizelegendwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void QgsDataDefinedSizeLegendWidget::changeSymbol()
if ( d.exec() != QDialog::Accepted )
return;

mSourceSymbol.reset( newSymbol.release() );
mSourceSymbol = std::move( newSymbol );
QIcon icon = QgsSymbolLayerUtils::symbolPreviewIcon( mSourceSymbol.get(), btnChangeSymbol->iconSize() );
btnChangeSymbol->setIcon( icon );

Expand Down

0 comments on commit 7855849

Please sign in to comment.