summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Thakker <github@anandthakker.net>2017-08-11 23:14:24 -0400
committerAnand Thakker <github@anandthakker.net>2017-08-11 23:14:24 -0400
commit16ae369eb07f6f0c32528a85340a0f20f1089157 (patch)
tree30ed78dec1714610d859c54407117b23b4a27a1b
parent669f2ce8daf626a1abb15998f46076fb721882c7 (diff)
downloadqtlocation-mapboxgl-16ae369eb07f6f0c32528a85340a0f20f1089157.tar.gz
Translate color identity functions
-rw-r--r--include/mbgl/style/function/convert.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/style/function/convert.hpp b/include/mbgl/style/function/convert.hpp
index 611bf66e09..67624625d4 100644
--- a/include/mbgl/style/function/convert.hpp
+++ b/include/mbgl/style/function/convert.hpp
@@ -335,6 +335,13 @@ struct Convert {
[&] (const type::BooleanType&) {
return makeGet("boolean", property, ParsingContext(errors));
},
+ [&] (const type::ColorType&) {
+ std::vector<std::unique_ptr<Expression>> args;
+ args.push_back(makeGet("string", property, ParsingContext(errors)));
+ ParseResult color = CompoundExpressions::create("parse_color", std::move(args), ParsingContext(errors));
+ assert(color);
+ return std::move(*color);
+ },
[&] (const type::Array& arr) {
std::vector<std::unique_ptr<Expression>> getArgs;
getArgs.push_back(makeLiteral(property));