diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-03 13:51:27 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-06 10:38:47 -0800 |
commit | 7de4ce5bcbd8a3081f364bef3249d99f3fad60cc (patch) | |
tree | 36eb1fc1c998d58ba51d081db83c43e03cbc19ff /src/mbgl/annotation/shape_annotation_impl.cpp | |
parent | 5ef5d0886731a800128e5200b4f5bb45708d2b27 (diff) | |
download | qtlocation-mapboxgl-7de4ce5bcbd8a3081f364bef3249d99f3fad60cc.tar.gz |
[core] Simplify Function
Diffstat (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp')
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index f84946fe11..3486c43d0e 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -34,9 +34,9 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { const LinePaintProperties& properties = shape.properties.get<LinePaintProperties>(); ClassProperties paintProperties; - paintProperties.set(PropertyKey::LineOpacity, ConstantFunction<float>(properties.opacity)); - paintProperties.set(PropertyKey::LineWidth, ConstantFunction<float>(properties.width)); - paintProperties.set(PropertyKey::LineColor, ConstantFunction<Color>(properties.color)); + paintProperties.set(PropertyKey::LineOpacity, Function<float>(properties.opacity)); + paintProperties.set(PropertyKey::LineWidth, Function<float>(properties.width)); + paintProperties.set(PropertyKey::LineColor, Function<Color>(properties.color)); layer->paints.paints.emplace(ClassID::Default, std::move(paintProperties)); } else if (shape.properties.is<FillPaintProperties>()) { @@ -44,9 +44,9 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { const FillPaintProperties& properties = shape.properties.get<FillPaintProperties>(); ClassProperties paintProperties; - paintProperties.set(PropertyKey::FillOpacity, ConstantFunction<float>(properties.opacity)); - paintProperties.set(PropertyKey::FillColor, ConstantFunction<Color>(properties.fill_color)); - paintProperties.set(PropertyKey::FillOutlineColor, ConstantFunction<Color>(properties.stroke_color)); + paintProperties.set(PropertyKey::FillOpacity, Function<float>(properties.opacity)); + paintProperties.set(PropertyKey::FillColor, Function<Color>(properties.fill_color)); + paintProperties.set(PropertyKey::FillOutlineColor, Function<Color>(properties.stroke_color)); layer->paints.paints.emplace(ClassID::Default, std::move(paintProperties)); } else { @@ -83,7 +83,7 @@ std::unique_ptr<StyleLayer> ShapeAnnotationImpl::createLineLayer() { type = ProjectedFeatureType::LineString; std::unique_ptr<LineLayer> layer = std::make_unique<LineLayer>(); layer->type = StyleLayerType::Line; - layer->layout.set(PropertyKey::LineJoin, ConstantFunction<JoinType>(JoinType::Round)); + layer->layout.set(PropertyKey::LineJoin, Function<JoinType>(JoinType::Round)); return std::move(layer); } |