summaryrefslogtreecommitdiff
path: root/include/mbgl/style/function/interval_stops.hpp
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-01-31 15:44:18 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-02 09:44:42 -0800
commit8a5bff8ee630673c6ebc496322eab94a41ae9353 (patch)
tree8bb6428cd9c3d591c237d77f94d4b0e56efb0ee0 /include/mbgl/style/function/interval_stops.hpp
parent141e995806576364d185626176c1b993fc519291 (diff)
downloadqtlocation-mapboxgl-8a5bff8ee630673c6ebc496322eab94a41ae9353.tar.gz
[core] default value support in categorical function conversion
Diffstat (limited to 'include/mbgl/style/function/interval_stops.hpp')
-rw-r--r--include/mbgl/style/function/interval_stops.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/style/function/interval_stops.hpp b/include/mbgl/style/function/interval_stops.hpp
index cf879d730b..50f2b48453 100644
--- a/include/mbgl/style/function/interval_stops.hpp
+++ b/include/mbgl/style/function/interval_stops.hpp
@@ -18,15 +18,15 @@ public:
: stops(std::move(stops_)) {
}
- T evaluate(const Value& value) const {
+ optional<T> evaluate(const Value& value) const {
if (stops.empty()) {
assert(false);
- return T();
+ return {};
}
optional<float> z = numericValue<float>(value);
if (!z) {
- return T();
+ return {};
}
auto it = stops.upper_bound(*z);