Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Silence a cppcheck warning which is potentially dangerous
  • Loading branch information
nyalldawson committed Apr 17, 2023
1 parent 940ffac commit 9474248
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/mesh/qgsmesheditor.cpp
Expand Up @@ -54,7 +54,13 @@ QgsMeshEditor::QgsMeshEditor( QgsMesh *nativeMesh, QgsTriangularMesh *triangular
QgsMeshDatasetGroup *QgsMeshEditor::createZValueDatasetGroup()
{
std::unique_ptr<QgsMeshDatasetGroup> zValueDatasetGroup = std::make_unique<QgsMeshVerticesElevationDatasetGroup>( tr( "vertices Z value" ), mMesh );

// this DOES look very dangerous!
// TODO rework to avoid this danger

// cppcheck-suppress danglingLifetime
mZValueDatasetGroup = zValueDatasetGroup.get();

return zValueDatasetGroup.release();
}

Expand Down

0 comments on commit 9474248

Please sign in to comment.