Refactor: use conversion system to convert MGLStyleFunction to mbgl core types (#8026)

This leverages the work already happening in `mbgl::style::conversion` to convert style functions from style-spec definitions into `mbgl::style::{Camera,Source,Composite}Function`s.  In particular, this allows the conversions system to handle the differing typing requirements based on whether the output type of the style function is interpolatable or non-interpolatable.
This commit is contained in:
Anand Thakker
2017-02-15 17:16:54 -05:00
committed by GitHub
parent eb8a1ef7aa
commit 685f237d02
7 changed files with 398 additions and 287 deletions

View File

@@ -200,7 +200,7 @@ struct Converter<CameraFunction<T>> {
template <class T, class V>
Result<optional<T>> convertDefaultValue(const V& value) {
auto defaultValueValue = objectMember(value, "defaultValue");
auto defaultValueValue = objectMember(value, "default");
if (!defaultValueValue) {
return {};
}