summaryrefslogtreecommitdiff
path: root/include/mbgl/style/conversion/property_value.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/conversion/property_value.hpp')
-rw-r--r--include/mbgl/style/conversion/property_value.hpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/mbgl/style/conversion/property_value.hpp b/include/mbgl/style/conversion/property_value.hpp
index d5e2a5c3c8..f8937da07d 100644
--- a/include/mbgl/style/conversion/property_value.hpp
+++ b/include/mbgl/style/conversion/property_value.hpp
@@ -12,21 +12,21 @@ namespace conversion {
template <class T>
struct Converter<PropertyValue<T>> {
template <class V>
- Result<PropertyValue<T>> operator()(const V& value) const {
+ optional<PropertyValue<T>> operator()(const V& value, Error& error) const {
if (isUndefined(value)) {
- return {};
+ return PropertyValue<T>();
} else if (isObject(value)) {
- Result<CameraFunction<T>> function = convert<CameraFunction<T>>(value);
+ optional<CameraFunction<T>> function = convert<CameraFunction<T>>(value, error);
if (!function) {
- return function.error();
+ return {};
}
- return *function;
+ return { *function };
} else {
- Result<T> constant = convert<T>(value);
+ optional<T> constant = convert<T>(value, error);
if (!constant) {
- return constant.error();
+ return {};
}
- return *constant;
+ return { *constant };
}
}
};