diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-09-13 10:14:31 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-09-13 15:55:34 -0700 |
commit | 20adb486f7d6bee54e13913cbd658e18da79029d (patch) | |
tree | b5a56696c55afbff63d18c5007541ae7be8de18b /src | |
parent | b64b4cd1f7a2716ca1aa6e1745f114e0fabfbcf6 (diff) | |
download | qtlocation-mapboxgl-20adb486f7d6bee54e13913cbd658e18da79029d.tar.gz |
[core] Make "to-number" of null behave as documented
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/expression/coercion.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mbgl/style/expression/coercion.cpp b/src/mbgl/style/expression/coercion.cpp index 2481444dc4..187cdd48a4 100644 --- a/src/mbgl/style/expression/coercion.cpp +++ b/src/mbgl/style/expression/coercion.cpp @@ -10,6 +10,7 @@ namespace expression { EvaluationResult toNumber(const Value& v) { optional<double> result = v.match( + [](NullValue) -> optional<double> { return 0.0; }, [](const double f) -> optional<double> { return f; }, [](const std::string& s) -> optional<double> { try { |