summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/dsl.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-09-13 15:03:19 -0700
committerChris Loer <chris.loer@mapbox.com>2018-09-19 14:54:38 -0700
commit2e93a9ddcf1f97188250335d991fbd7a2cc283af (patch)
tree86289e08e361a90e38c35db12501ea9b056d832d /src/mbgl/style/expression/dsl.cpp
parent89b075f592271bc11d58ebb7f854c453e81e3cf1 (diff)
downloadqtlocation-mapboxgl-2e93a9ddcf1f97188250335d991fbd7a2cc283af.tar.gz
[core] For string-valued properties, do coercion rather than assertion
Diffstat (limited to 'src/mbgl/style/expression/dsl.cpp')
-rw-r--r--src/mbgl/style/expression/dsl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/dsl.cpp b/src/mbgl/style/expression/dsl.cpp
index cdada583a2..c6318fb637 100644
--- a/src/mbgl/style/expression/dsl.cpp
+++ b/src/mbgl/style/expression/dsl.cpp
@@ -74,7 +74,7 @@ std::unique_ptr<Expression> toColor(std::unique_ptr<Expression> value) {
}
std::unique_ptr<Expression> toString(std::unique_ptr<Expression> value) {
- return compound("to-string", std::move(value));
+ return std::make_unique<Coercion>(type::String, vec(std::move(value)));
}
std::unique_ptr<Expression> get(const char* value) {