Skip to content

Commit ac7e041

Browse files
committedOct 19, 2017
Revert "Fix build warnings on Travis"
Hey clang - how about you don't through warnings if fixing them breaks the build? This reverts commit e28a555.
1 parent e28a555 commit ac7e041

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎src/core/geometry/qgsgeos.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::subdivide( int maxNodes, QString *
290290
}
291291
CATCH_GEOS_WITH_ERRMSG( nullptr )
292292

293-
return parts;
293+
return std::move( parts );
Code has comments. Press enter to view.
294294
}
295295

296296
QgsAbstractGeometry *QgsGeos::combine( const QgsAbstractGeometry *geom, QString *errorMsg ) const
@@ -881,7 +881,7 @@ geos::unique_ptr QgsGeos::nodeGeometries( const GEOSGeometry *splitLine, const G
881881
geos::unique_ptr splitLineClone( GEOSGeom_clone_r( geosinit.ctxt, splitLine ) );
882882
geos::unique_ptr unionGeometry( GEOSUnion_r( geosinit.ctxt, splitLineClone.get(), geometryBoundary.get() ) );
883883

884-
return unionGeometry;
884+
return std::move( unionGeometry );
885885
}
886886

887887
int QgsGeos::mergeGeometriesMultiTypeSplit( QVector<GEOSGeometry *> &splitResult ) const
@@ -984,7 +984,7 @@ geos::unique_ptr QgsGeos::createGeosCollection( int typeId, const QVector<GEOSGe
984984

985985
delete [] geomarr;
986986

987-
return geom;
987+
return std::move( geom );
988988
}
989989

990990
std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos )
@@ -1026,7 +1026,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
10261026
multiPoint->addGeometry( coordSeqPoint( cs, 0, hasZ, hasM ).clone() );
10271027
}
10281028
}
1029-
return multiPoint;
1029+
return std::move( multiPoint );
10301030
}
10311031
case GEOS_MULTILINESTRING:
10321032
{
@@ -1040,7 +1040,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
10401040
multiLineString->addGeometry( line.release() );
10411041
}
10421042
}
1043-
return multiLineString;
1043+
return std::move( multiLineString );
10441044
}
10451045
case GEOS_MULTIPOLYGON:
10461046
{
@@ -1055,7 +1055,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
10551055
multiPolygon->addGeometry( poly.release() );
10561056
}
10571057
}
1058-
return multiPolygon;
1058+
return std::move( multiPolygon );
10591059
}
10601060
case GEOS_GEOMETRYCOLLECTION:
10611061
{
@@ -1069,7 +1069,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::fromGeos( const GEOSGeometry *geos
10691069
geomCollection->addGeometry( geom.release() );
10701070
}
10711071
}
1072-
return geomCollection;
1072+
return std::move( geomCollection );
10731073
}
10741074
}
10751075
return nullptr;
@@ -1767,7 +1767,7 @@ geos::unique_ptr QgsGeos::createGeosPointXY( double x, double y, bool hasZ, doub
17671767
geosPoint.reset( GEOSGeom_createPoint_r( geosinit.ctxt, coordSeq ) );
17681768
}
17691769
CATCH_GEOS( nullptr )
1770-
return geosPoint;
1770+
return std::move( geosPoint );
17711771
}
17721772

17731773
geos::unique_ptr QgsGeos::createGeosLinestring( const QgsAbstractGeometry *curve, double precision )
@@ -1786,7 +1786,7 @@ geos::unique_ptr QgsGeos::createGeosLinestring( const QgsAbstractGeometry *curve
17861786
geosGeom.reset( GEOSGeom_createLineString_r( geosinit.ctxt, coordSeq ) );
17871787
}
17881788
CATCH_GEOS( nullptr )
1789-
return geosGeom;
1789+
return std::move( geosGeom );
17901790
}
17911791

17921792
geos::unique_ptr QgsGeos::createGeosPolygon( const QgsAbstractGeometry *poly, double precision )
@@ -1823,7 +1823,7 @@ geos::unique_ptr QgsGeos::createGeosPolygon( const QgsAbstractGeometry *poly, do
18231823
}
18241824
CATCH_GEOS( nullptr )
18251825

1826-
return geosPolygon;
1826+
return std::move( geosPolygon );
18271827
}
18281828

18291829
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
22532253
GEOSGeometry *geoms[2] = { g1.release(), g2.release() };
22542254
geos::unique_ptr multiGeom( GEOSGeom_createCollection_r( geosinit.ctxt, GEOS_MULTILINESTRING, geoms, 2 ) );
22552255
geos::unique_ptr res( GEOSLineMerge_r( geosinit.ctxt, multiGeom.get() ) );
2256-
return res;
2256+
return std::move( res );
22572257
}
22582258
else
22592259
return nullptr;
@@ -2335,7 +2335,7 @@ geos::unique_ptr QgsGeos::reshapeLine( const GEOSGeometry *line, const GEOSGeome
23352335
if ( numMergedLines == 1 ) //reshape line is from begin to endpoint. So we keep the reshapeline
23362336
{
23372337
geos::unique_ptr result( GEOSGeom_clone_r( geosinit.ctxt, reshapeLineGeos ) );
2338-
return result;
2338+
return std::move( result );
23392339
}
23402340
else
23412341
return nullptr;
@@ -2469,7 +2469,7 @@ geos::unique_ptr QgsGeos::reshapeLine( const GEOSGeometry *line, const GEOSGeome
24692469
return nullptr;
24702470
}
24712471

2472-
return result;
2472+
return std::move( result );
24732473
}
24742474

24752475
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
25822582
geos::unique_ptr reshapedPolygon( GEOSGeom_createPolygon_r( geosinit.ctxt, newOuterRing, newInnerRings, ringList.size() ) );
25832583
delete[] newInnerRings;
25842584

2585-
return reshapedPolygon;
2585+
return std::move( reshapedPolygon );
25862586
}
25872587

25882588
int QgsGeos::lineContainedInLine( const GEOSGeometry *line1, const GEOSGeometry *line2 )

0 commit comments

Comments
 (0)
Please sign in to comment.