File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -91,10 +91,7 @@ static QgsGeometry generalizeWkbGeometryByBoundingBox(
91
91
// Write the generalized geometry
92
92
if ( geometryType == QgsWkbTypes::LineString )
93
93
{
94
- QgsLineString *lineString = new QgsLineString ();
95
- lineString->addVertex ( QgsPoint ( x1, y1 ) );
96
- lineString->addVertex ( QgsPoint ( x2, y2 ) );
97
- return QgsGeometry ( lineString );
94
+ return QgsGeometry ( qgis::make_unique< QgsLineString >( QVector<double >() << x1 << x2, QVector<double >() << y1 << y2 ) );
98
95
}
99
96
else
100
97
{
@@ -127,9 +124,9 @@ QgsGeometry QgsMapToPixelSimplifier::simplifyGeometry(
127
124
// Write the geometry
128
125
if ( flatType == QgsWkbTypes::LineString || flatType == QgsWkbTypes::CircularString )
129
126
{
127
+ const QgsCurve &srcCurve = dynamic_cast <const QgsCurve &>( geometry );
130
128
const int numPoints = srcCurve.numPoints ();
131
129
132
- const QgsCurve &srcCurve = dynamic_cast <const QgsCurve &>( geometry );
133
130
std::unique_ptr<QgsCurve> output;
134
131
135
132
QVector< double > lineStringX;
You can’t perform that action at this time.
0 commit comments