summaryrefslogtreecommitdiff
path: root/src/mbgl/style/conversion/property_value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/conversion/property_value.cpp')
-rw-r--r--src/mbgl/style/conversion/property_value.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mbgl/style/conversion/property_value.cpp b/src/mbgl/style/conversion/property_value.cpp
index 5e03189e64..1a0e686850 100644
--- a/src/mbgl/style/conversion/property_value.cpp
+++ b/src/mbgl/style/conversion/property_value.cpp
@@ -88,6 +88,25 @@ Converter<PropertyValue<mbgl::style::expression::Image>>::operator()(conversion:
bool,
bool) const;
+optional<PropertyValue<std::array<double, 3>>>
+mbgl::style::conversion::Converter<PropertyValue<std::array<double, 3>>, void>::operator()(const Convertible& value,
+ Error& error,
+ bool,
+ bool) const {
+ optional<std::array<double, 3>> a = convert<std::array<double, 3>>(value, error);
+
+ if (!a) {
+ return nullopt;
+ }
+ std::array<double, 3> res;
+ res[0] = (*a)[0];
+ res[1] = (*a)[1];
+ res[2] = (*a)[2];
+
+ PropertyValue<std::array<double, 3>> r(res);
+ return r;
+}
+
} // namespace conversion
} // namespace style
} // namespace mbgl