Skip to content
Permalink
Browse files

Use std::move to reassign unique_ptrs

  • Loading branch information
nyalldawson committed Sep 11, 2017
1 parent 68ad9fe commit 78558496777ad5d93eff2816e9bbd18e829d5a0a
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/core/qgsproject.cpp
  2. +1 −1 src/gui/symbology/qgsdatadefinedsizelegendwidget.cpp
@@ -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;
@@ -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 );

0 comments on commit 7855849

Please sign in to comment.
You can’t perform that action at this time.