diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-07 14:56:32 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-07 18:22:33 -0800 |
commit | e04c5f650648d150e78da3602745b6190ec4aee3 (patch) | |
tree | 5420b75780c798af82aa5831a1413c8bf1df0c96 /src/mbgl/annotation/shape_annotation_impl.cpp | |
parent | 8bfc5de1dc969559e031de6650d234e086cb4fb2 (diff) | |
download | qtlocation-mapboxgl-e04c5f650648d150e78da3602745b6190ec4aee3.tar.gz |
[core] Replace StyleLayerType with RTTI
Diffstat (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp')
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index a3f5fd2d6a..28d4b1e3d4 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -30,7 +30,6 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { type = ProjectedFeatureType::LineString; std::unique_ptr<LineLayer> layer = std::make_unique<LineLayer>(); - layer->type = StyleLayerType::Line; layer->layout.join = JoinType::Round; const LineAnnotationProperties& properties = shape.properties.get<LineAnnotationProperties>(); @@ -48,7 +47,6 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { type = ProjectedFeatureType::Polygon; std::unique_ptr<FillLayer> layer = std::make_unique<FillLayer>(); - layer->type = StyleLayerType::Fill; const FillAnnotationProperties& properties = shape.properties.get<FillAnnotationProperties>(); layer->paint.opacity = properties.opacity; @@ -67,7 +65,7 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { std::unique_ptr<StyleLayer> layer = sourceLayer->clone(); - type = layer->type == StyleLayerType::Line + type = layer->is<LineLayer>() ? ProjectedFeatureType::LineString : ProjectedFeatureType::Polygon; |