Use explicit tag with GeoDataLinearRing(const GeoDataGeometry &other)

parent 0b69cbfb
......@@ -78,7 +78,7 @@ class GEODATA_EXPORT GeoDataLinearRing : public GeoDataLineString
/*!
\brief Creates a LinearRing from an existing geometry object.
*/
GeoDataLinearRing( const GeoDataGeometry &other );
explicit GeoDataLinearRing(const GeoDataGeometry &other);
/*!
......
......@@ -420,7 +420,7 @@ void MeasureToolPlugin::drawSegments( GeoPainter* painter )
}
if (m_paintMode == Polygon && m_measureLineString.size() > 2) {
GeoDataLinearRing measureRing = m_measureLineString;
GeoDataLinearRing measureRing(m_measureLineString);
if (m_showPolygonArea || m_showPerimeter) {
painter->setPen( Qt::NoPen );
......
......@@ -56,7 +56,7 @@ void OsmWay::create(GeoDataDocument *document, const OsmNodes &nodes) const
linearRing->append(node.coordinates());
}
*linearRing = linearRing->optimized();
*linearRing = GeoDataLinearRing(linearRing->optimized());
} else {
GeoDataLineString* lineString = new GeoDataLineString;
placemark->setGeometry(lineString);
......
......@@ -478,12 +478,12 @@ void OsmParser::importMultipolygon( const Relation &relation )
}
GeoDataPolygon polygon;
polygon.setOuterBoundary( string );
polygon.setOuterBoundary(GeoDataLinearRing(string));
Q_ASSERT( polygon.outerBoundary().size() > 0 );
foreach( const GeoDataLineString & hole, inner ) {
if ( contains<GeoDataLinearRing, GeoDataLineString>( polygon.outerBoundary(), hole ) ) {
polygon.appendInnerBoundary( hole );
polygon.appendInnerBoundary(GeoDataLinearRing(hole));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment