Skip to content

Commit 34c9bd8

Browse files
committedAug 13, 2021
Fix build
1 parent 1acedba commit 34c9bd8

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
 

‎src/analysis/vector/qgsgeometrysnapper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void QgsSnapIndex::addPoint( const CoordIdx *idx, bool isEndPoint )
209209

210210
GEOSContextHandle_t geosctxt = QgsGeos::getGEOSHandler();
211211
#if GEOS_VERSION_MAJOR>3 || GEOS_VERSION_MINOR>=8
212-
const geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, row, col ) );
212+
geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, row, col ) );
213213
#else
214214
GEOSCoordSequence *seq = GEOSCoordSeq_create_r( geosctxt, 1, 2 );
215215
GEOSCoordSeq_setX_r( geosctxt, seq, 0, row );
@@ -240,7 +240,7 @@ void QgsSnapIndex::addSegment( const CoordIdx *idxFrom, const CoordIdx *idxTo )
240240
for ( ; rt.isValid(); rt.next() )
241241
{
242242
#if GEOS_VERSION_MAJOR>3 || GEOS_VERSION_MINOR>=8
243-
const geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, rt.curRow(), rt.curCol() ) );
243+
geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, rt.curRow(), rt.curCol() ) );
244244
#else
245245
GEOSCoordSequence *seq = GEOSCoordSeq_create_r( geosctxt, 1, 2 );
246246
GEOSCoordSeq_setX_r( geosctxt, seq, 0, rt.curRow() );
@@ -317,7 +317,7 @@ QgsPoint QgsSnapIndex::getClosestSnapToPoint( const QgsPoint &p, const QgsPoint
317317
for ( ; rt.isValid(); rt.next() )
318318
{
319319
#if GEOS_VERSION_MAJOR>3 || GEOS_VERSION_MINOR>=8
320-
const geos::unique_ptr searchPoint( GEOSGeom_createPointFromXY_r( geosctxt, rt.curRow(), rt.curCol() ) );
320+
geos::unique_ptr searchPoint( GEOSGeom_createPointFromXY_r( geosctxt, rt.curRow(), rt.curCol() ) );
321321
#else
322322
GEOSCoordSequence *seq = GEOSCoordSeq_create_r( geosctxt, 1, 2 );
323323
GEOSCoordSeq_setX_r( geosctxt, seq, 0, rt.curRow() );
@@ -369,7 +369,7 @@ QgsSnapIndex::SnapItem *QgsSnapIndex::getSnapItem( const QgsPoint &pos, double t
369369
GEOSCoordSeq_setY_r( geosctxt, coord, 1, colEnd );
370370
#endif
371371

372-
const geos::unique_ptr searchDiagonal( GEOSGeom_createLineString_r( geosctxt, coord ) );
372+
geos::unique_ptr searchDiagonal( GEOSGeom_createLineString_r( geosctxt, coord ) );
373373

374374
QList<SnapItem *> items;
375375
struct _GEOSQueryCallbackData callbackData;

‎src/core/pal/geomfunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ bool GeomFunction::containsCandidate( const GEOSPreparedGeometry *geom, double x
359359
GEOSCoordSeq_setY_r( geosctxt, coord, 4, y );
360360
#endif
361361

362-
const geos::unique_ptr bboxGeos( GEOSGeom_createLinearRing_r( geosctxt, coord ) );
362+
geos::unique_ptr bboxGeos( GEOSGeom_createLinearRing_r( geosctxt, coord ) );
363363
const bool result = ( GEOSPreparedContainsProperly_r( geosctxt, geom, bboxGeos.get() ) == 1 );
364364
return result;
365365
}

‎src/core/pal/pointset.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ bool PointSet::containsPoint( double x, double y ) const
269269
try
270270
{
271271
#if GEOS_VERSION_MAJOR>3 || GEOS_VERSION_MINOR>=8
272-
const geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, x, y ) );
272+
geos::unique_ptr point( GEOSGeom_createPointFromXY_r( geosctxt, x, y ) );
273273
#else
274274
GEOSCoordSequence *seq = GEOSCoordSeq_create_r( geosctxt, 1, 2 );
275275
GEOSCoordSeq_setX_r( geosctxt, seq, 0, x );
@@ -862,7 +862,7 @@ double PointSet::minDistanceToPoint( double px, double py, double *rx, double *r
862862
try
863863
{
864864
#if GEOS_VERSION_MAJOR>3 || GEOS_VERSION_MINOR>=8
865-
const geos::unique_ptr geosPt( GEOSGeom_createPointFromXY_r( geosctxt, px, py ) );
865+
geos::unique_ptr geosPt( GEOSGeom_createPointFromXY_r( geosctxt, px, py ) );
866866
#else
867867
GEOSCoordSequence *coord = GEOSCoordSeq_create_r( geosctxt, 1, 2 );
868868
GEOSCoordSeq_setX_r( geosctxt, coord, 0, px );
@@ -940,7 +940,7 @@ void PointSet::getCentroid( double &px, double &py, bool forceInside ) const
940940
try
941941
{
942942
GEOSContextHandle_t geosctxt = QgsGeos::getGEOSHandler();
943-
const geos::unique_ptr centroidGeom( GEOSGetCentroid_r( geosctxt, mGeos ) );
943+
geos::unique_ptr centroidGeom( GEOSGetCentroid_r( geosctxt, mGeos ) );
944944
if ( centroidGeom )
945945
{
946946
const GEOSCoordSequence *coordSeq = GEOSGeom_getCoordSeq_r( geosctxt, centroidGeom.get() );
@@ -959,7 +959,7 @@ void PointSet::getCentroid( double &px, double &py, bool forceInside ) const
959959
// check if centroid inside in polygon
960960
if ( forceInside && !containsPoint( px, py ) )
961961
{
962-
const geos::unique_ptr pointGeom( GEOSPointOnSurface_r( geosctxt, mGeos ) );
962+
geos::unique_ptr pointGeom( GEOSPointOnSurface_r( geosctxt, mGeos ) );
963963

964964
if ( pointGeom )
965965
{

‎src/plugins/topology/topolTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
static bool _canExportToGeos( const QgsGeometry &geom )
3939
{
40-
const geos::unique_ptr geosGeom = QgsGeos::asGeos( geom );
40+
geos::unique_ptr geosGeom = QgsGeos::asGeos( geom );
4141
return static_cast<bool>( geosGeom );
4242
}
4343

0 commit comments

Comments
 (0)
Please sign in to comment.