Skip to content

Commit

Permalink
clang workaround to fix build: use move on return unique_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa authored and nyalldawson committed May 24, 2018
1 parent c753870 commit 98b683c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/qgsmaptopixelgeometrysimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ static std::unique_ptr< QgsAbstractGeometry > generalizeWkbGeometryByBoundingBox
<< y2
<< y1 );
if ( geometryType == QgsWkbTypes::LineString )
return ext;
return std::move( ext );
else
{
std::unique_ptr< QgsPolygon > polygon = qgis::make_unique< QgsPolygon >();
polygon->setExteriorRing( ext.release() );
return polygon;
return std::move( polygon );
}
}
}
Expand Down Expand Up @@ -305,7 +305,7 @@ std::unique_ptr< QgsAbstractGeometry > QgsMapToPixelSimplifier::simplifyGeometry
}
}

return output;
return std::move( output );
}
else if ( flatType == QgsWkbTypes::Polygon )
{
Expand All @@ -319,7 +319,7 @@ std::unique_ptr< QgsAbstractGeometry > QgsMapToPixelSimplifier::simplifyGeometry
std::unique_ptr< QgsAbstractGeometry > ring = simplifyGeometry( simplifyFlags, simplifyAlgorithm, *sub, map2pixelTol, true );
polygon->addInteriorRing( qgsgeometry_cast<QgsCurve *>( ring.release() ) );
}
return polygon;
return std::move( polygon );
}
else if ( QgsWkbTypes::isMultiType( flatType ) )
{
Expand All @@ -332,7 +332,7 @@ std::unique_ptr< QgsAbstractGeometry > QgsMapToPixelSimplifier::simplifyGeometry
std::unique_ptr< QgsAbstractGeometry > part = simplifyGeometry( simplifyFlags, simplifyAlgorithm, *sub, map2pixelTol, false );
collection->addGeometry( part.release() );
}
return collection;
return std::move( collection );
}
return std::unique_ptr< QgsAbstractGeometry >( geometry.clone() );
}
Expand Down

0 comments on commit 98b683c

Please sign in to comment.