summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation/line_annotation_impl.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-10-29 14:29:16 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-10-30 16:23:31 +0200
commit99e1a8a3df1a08464d8529b6988c1665b87c7c8b (patch)
tree4d45675ef4b54d00d7ef2a4dccbc211522515dce /src/mbgl/annotation/line_annotation_impl.cpp
parent2ef9580565e2125e07124d23c0bcf400c8736931 (diff)
downloadqtlocation-mapboxgl-99e1a8a3df1a08464d8529b6988c1665b87c7c8b.tar.gz
Remove style::Layer::is()/as()upstream/mikhail_drop_style_layer_cast
Diffstat (limited to 'src/mbgl/annotation/line_annotation_impl.cpp')
-rw-r--r--src/mbgl/annotation/line_annotation_impl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/annotation/line_annotation_impl.cpp b/src/mbgl/annotation/line_annotation_impl.cpp
index 74fec49af8..b4dc10049f 100644
--- a/src/mbgl/annotation/line_annotation_impl.cpp
+++ b/src/mbgl/annotation/line_annotation_impl.cpp
@@ -22,7 +22,8 @@ void LineAnnotationImpl::updateStyle(Style::Impl& style) const {
layer = style.addLayer(std::move(newLayer), AnnotationManager::PointLayerID);
}
- auto* lineLayer = layer->as<LineLayer>();
+ assert(layer->getType() == LayerType::Line);
+ LineLayer* lineLayer = static_cast<LineLayer*>(layer);
lineLayer->setLineOpacity(annotation.opacity);
lineLayer->setLineWidth(annotation.width);
lineLayer->setLineColor(annotation.color);