diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-07-11 19:15:10 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-07-12 20:42:29 +0300 |
commit | 2fae373fc9da1a5ed61b5114d8c982073734826d (patch) | |
tree | 105ce580cc7df0cf9cf0a9997c4702bc76b3faeb /include/mbgl/annotation | |
parent | 21031b624ffabf92bf284c830b3d13a3ae045460 (diff) | |
download | qtlocation-mapboxgl-2fae373fc9da1a5ed61b5114d8c982073734826d.tar.gz |
[core] GCC 4.9 is unable to deduce ctors when using bracket init
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r-- | include/mbgl/annotation/annotation.hpp | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/include/mbgl/annotation/annotation.hpp b/include/mbgl/annotation/annotation.hpp index 96e06ca222..bbe479b5ba 100644 --- a/include/mbgl/annotation/annotation.hpp +++ b/include/mbgl/annotation/annotation.hpp @@ -17,6 +17,10 @@ using AnnotationIDs = std::vector<AnnotationID>; class SymbolAnnotation { public: + SymbolAnnotation(Point<double> geometry_, std::string icon_ = {}) + : geometry(std::move(geometry_)), + icon(std::move(icon_)) {} + Point<double> geometry; std::string icon; }; @@ -29,18 +33,36 @@ using ShapeAnnotationGeometry = variant< class LineAnnotation { public: + LineAnnotation(ShapeAnnotationGeometry geometry_, + style::DataDrivenPropertyValue<float> opacity_ = 1.0f, + style::DataDrivenPropertyValue<float> width_ = 1.0f, + style::DataDrivenPropertyValue<Color> color_ = Color::black()) + : geometry(std::move(geometry_)), + opacity(std::move(opacity_)), + width(std::move(width_)), + color(std::move(color_)) {} + ShapeAnnotationGeometry geometry; - style::DataDrivenPropertyValue<float> opacity { 1.0f }; - style::DataDrivenPropertyValue<float> width { 1.0f }; - style::DataDrivenPropertyValue<Color> color { Color::black() }; + style::DataDrivenPropertyValue<float> opacity; + style::DataDrivenPropertyValue<float> width; + style::DataDrivenPropertyValue<Color> color; }; class FillAnnotation { public: + FillAnnotation(ShapeAnnotationGeometry geometry_, + style::DataDrivenPropertyValue<float> opacity_ = 1.0f, + style::DataDrivenPropertyValue<Color> color_ = Color::black(), + style::DataDrivenPropertyValue<Color> outlineColor_ = {}) + : geometry(std::move(geometry_)), + opacity(std::move(opacity_)), + color(std::move(color_)), + outlineColor(std::move(outlineColor_)) {} + ShapeAnnotationGeometry geometry; - style::DataDrivenPropertyValue<float> opacity { 1.0f }; - style::DataDrivenPropertyValue<Color> color { Color::black() }; - style::DataDrivenPropertyValue<Color> outlineColor {}; + style::DataDrivenPropertyValue<float> opacity; + style::DataDrivenPropertyValue<Color> color; + style::DataDrivenPropertyValue<Color> outlineColor; }; using Annotation = variant< |