@@ -290,7 +290,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::subdivide( int maxNodes, QString *
290
290
}
291
291
CATCH_GEOS_WITH_ERRMSG ( nullptr )
292
292
293
- return parts;
293
+ return std::move ( parts ) ;
Collapse comment Comment on line R293
Fixed by d6f25b2 - i misread part of the warning
Code has comments. Press enter to view. 294
294
}
295
295
296
296
QgsAbstractGeometry *QgsGeos::combine ( const QgsAbstractGeometry *geom, QString *errorMsg ) const
@@ -881,7 +881,7 @@ geos::unique_ptr QgsGeos::nodeGeometries( const GEOSGeometry *splitLine, const G
881
881
geos::unique_ptr splitLineClone ( GEOSGeom_clone_r ( geosinit.ctxt , splitLine ) );
882
882
geos::unique_ptr unionGeometry ( GEOSUnion_r ( geosinit.ctxt , splitLineClone.get (), geometryBoundary.get () ) );
883
883
884
- return unionGeometry;
884
+ return std::move ( unionGeometry ) ;
885
885
}
886
886
887
887
int QgsGeos::mergeGeometriesMultiTypeSplit ( QVector<GEOSGeometry *> &splitResult ) const
@@ -984,7 +984,7 @@ geos::unique_ptr QgsGeos::createGeosCollection( int typeId, const QVector<GEOSGe
984
984
985
985
delete [] geomarr;
986
986
987
- return geom;
987
+ return std::move ( geom ) ;
988
988
}
989
989
990
990
std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos ( const GEOSGeometry *geos )
@@ -1026,7 +1026,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
1026
1026
multiPoint->addGeometry ( coordSeqPoint ( cs, 0 , hasZ, hasM ).clone () );
1027
1027
}
1028
1028
}
1029
- return multiPoint;
1029
+ return std::move ( multiPoint ) ;
1030
1030
}
1031
1031
case GEOS_MULTILINESTRING:
1032
1032
{
@@ -1040,7 +1040,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
1040
1040
multiLineString->addGeometry ( line.release () );
1041
1041
}
1042
1042
}
1043
- return multiLineString;
1043
+ return std::move ( multiLineString ) ;
1044
1044
}
1045
1045
case GEOS_MULTIPOLYGON:
1046
1046
{
@@ -1055,7 +1055,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
1055
1055
multiPolygon->addGeometry ( poly.release () );
1056
1056
}
1057
1057
}
1058
- return multiPolygon;
1058
+ return std::move ( multiPolygon ) ;
1059
1059
}
1060
1060
case GEOS_GEOMETRYCOLLECTION:
1061
1061
{
@@ -1069,7 +1069,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
1069
1069
geomCollection->addGeometry ( geom.release () );
1070
1070
}
1071
1071
}
1072
- return geomCollection;
1072
+ return std::move ( geomCollection ) ;
1073
1073
}
1074
1074
}
1075
1075
return nullptr ;
@@ -1767,7 +1767,7 @@ geos::unique_ptr QgsGeos::createGeosPointXY( double x, double y, bool hasZ, doub
1767
1767
geosPoint.reset ( GEOSGeom_createPoint_r ( geosinit.ctxt , coordSeq ) );
1768
1768
}
1769
1769
CATCH_GEOS ( nullptr )
1770
- return geosPoint;
1770
+ return std::move ( geosPoint ) ;
1771
1771
}
1772
1772
1773
1773
geos::unique_ptr QgsGeos::createGeosLinestring ( const QgsAbstractGeometry *curve, double precision )
@@ -1786,7 +1786,7 @@ geos::unique_ptr QgsGeos::createGeosLinestring( const QgsAbstractGeometry *curve
1786
1786
geosGeom.reset ( GEOSGeom_createLineString_r ( geosinit.ctxt , coordSeq ) );
1787
1787
}
1788
1788
CATCH_GEOS ( nullptr )
1789
- return geosGeom;
1789
+ return std::move ( geosGeom ) ;
1790
1790
}
1791
1791
1792
1792
geos::unique_ptr QgsGeos::createGeosPolygon ( const QgsAbstractGeometry *poly, double precision )
@@ -1823,7 +1823,7 @@ geos::unique_ptr QgsGeos::createGeosPolygon( const QgsAbstractGeometry *poly, do
1823
1823
}
1824
1824
CATCH_GEOS ( nullptr )
1825
1825
1826
- return geosPolygon;
1826
+ return std::move ( geosPolygon ) ;
1827
1827
}
1828
1828
1829
1829
QgsAbstractGeometry *QgsGeos::offsetCurve ( double distance, int segments, int joinStyle, double miterLimit, QString *errorMsg ) const
@@ -2253,7 +2253,7 @@ static geos::unique_ptr _mergeLinestrings( const GEOSGeometry *line1, const GEOS
2253
2253
GEOSGeometry *geoms[2 ] = { g1.release (), g2.release () };
2254
2254
geos::unique_ptr multiGeom ( GEOSGeom_createCollection_r ( geosinit.ctxt , GEOS_MULTILINESTRING, geoms, 2 ) );
2255
2255
geos::unique_ptr res ( GEOSLineMerge_r ( geosinit.ctxt , multiGeom.get () ) );
2256
- return res;
2256
+ return std::move ( res ) ;
2257
2257
}
2258
2258
else
2259
2259
return nullptr ;
@@ -2335,7 +2335,7 @@ geos::unique_ptr QgsGeos::reshapeLine( const GEOSGeometry *line, const GEOSGeome
2335
2335
if ( numMergedLines == 1 ) // reshape line is from begin to endpoint. So we keep the reshapeline
2336
2336
{
2337
2337
geos::unique_ptr result ( GEOSGeom_clone_r ( geosinit.ctxt , reshapeLineGeos ) );
2338
- return result;
2338
+ return std::move ( result ) ;
2339
2339
}
2340
2340
else
2341
2341
return nullptr ;
@@ -2469,7 +2469,7 @@ geos::unique_ptr QgsGeos::reshapeLine( const GEOSGeometry *line, const GEOSGeome
2469
2469
return nullptr ;
2470
2470
}
2471
2471
2472
- return result;
2472
+ return std::move ( result ) ;
2473
2473
}
2474
2474
2475
2475
geos::unique_ptr QgsGeos::reshapePolygon ( const GEOSGeometry *polygon, const GEOSGeometry *reshapeLineGeos, double precision )
@@ -2582,7 +2582,7 @@ geos::unique_ptr QgsGeos::reshapePolygon( const GEOSGeometry *polygon, const GEO
2582
2582
geos::unique_ptr reshapedPolygon ( GEOSGeom_createPolygon_r ( geosinit.ctxt , newOuterRing, newInnerRings, ringList.size () ) );
2583
2583
delete[] newInnerRings;
2584
2584
2585
- return reshapedPolygon;
2585
+ return std::move ( reshapedPolygon ) ;
2586
2586
}
2587
2587
2588
2588
int QgsGeos::lineContainedInLine ( const GEOSGeometry *line1, const GEOSGeometry *line2 )
0 commit comments