summaryrefslogtreecommitdiff
path: root/include/mbgl/style/conversion/function.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/style/conversion/function.hpp')
-rw-r--r--include/mbgl/style/conversion/function.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/style/conversion/function.hpp b/include/mbgl/style/conversion/function.hpp
index 8799e9faa4..49825a3410 100644
--- a/include/mbgl/style/conversion/function.hpp
+++ b/include/mbgl/style/conversion/function.hpp
@@ -19,7 +19,7 @@ template <class T>
optional<PropertyExpression<T>> convertFunctionToExpression(const Convertible& value, Error& error, bool convertTokens) {
auto expression = convertFunctionToExpression(expression::valueTypeToExpressionType<T>(), value, error, convertTokens);
if (!expression) {
- return {};
+ return nullopt;
}
optional<T> defaultValue;
@@ -28,8 +28,8 @@ optional<PropertyExpression<T>> convertFunctionToExpression(const Convertible& v
if (defaultValueValue) {
defaultValue = convert<T>(*defaultValueValue, error);
if (!defaultValue) {
- error = { R"(wrong type for "default": )" + error.message };
- return {};
+ error.message = R"(wrong type for "default": )" + error.message;
+ return nullopt;
}
}