summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/annotation/fill_annotation_impl.cpp3
-rw-r--r--src/mbgl/annotation/line_annotation_impl.cpp3
-rw-r--r--src/mbgl/style/layers/custom_layer.cpp5
3 files changed, 4 insertions, 7 deletions
diff --git a/src/mbgl/annotation/fill_annotation_impl.cpp b/src/mbgl/annotation/fill_annotation_impl.cpp
index 9d3e12e004..7ac1932f32 100644
--- a/src/mbgl/annotation/fill_annotation_impl.cpp
+++ b/src/mbgl/annotation/fill_annotation_impl.cpp
@@ -21,7 +21,8 @@ void FillAnnotationImpl::updateStyle(Style::Impl& style) const {
layer = style.addLayer(std::move(newLayer), AnnotationManager::PointLayerID);
}
- auto* fillLayer = layer->as<FillLayer>();
+ assert(layer->getType() == LayerType::Fill);
+ auto* fillLayer = static_cast<FillLayer*>(layer);
fillLayer->setFillOpacity(annotation.opacity);
fillLayer->setFillColor(annotation.color);
fillLayer->setFillOutlineColor(annotation.outlineColor);
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);
diff --git a/src/mbgl/style/layers/custom_layer.cpp b/src/mbgl/style/layers/custom_layer.cpp
index a31586f708..90b97104a0 100644
--- a/src/mbgl/style/layers/custom_layer.cpp
+++ b/src/mbgl/style/layers/custom_layer.cpp
@@ -39,10 +39,5 @@ Mutable<Layer::Impl> CustomLayer::mutableBaseImpl() const {
return staticMutableCast<Layer::Impl>(mutableImpl());
}
-template <>
-bool Layer::is<CustomLayer>() const {
- return getType() == LayerType::Custom;
-}
-
} // namespace style
} // namespace mbgl