diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-22 12:31:49 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-24 09:39:15 -0700 |
commit | 089c4e413fbe80711ebd874520d3b8fdcb997112 (patch) | |
tree | a8088b0ed6cbd36b5cadf247a6e0fc524b6c3a3d /src/mbgl/style/parser.cpp | |
parent | cb6a519f7c1e59b584b84039ebf4803c1d7eee71 (diff) | |
download | qtlocation-mapboxgl-089c4e413fbe80711ebd874520d3b8fdcb997112.tar.gz |
[core] Split up and clean up conversion.hpp
Diffstat (limited to 'src/mbgl/style/parser.cpp')
-rw-r--r-- | src/mbgl/style/parser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/style/parser.cpp b/src/mbgl/style/parser.cpp index eddda5d3f2..bbe2fd7862 100644 --- a/src/mbgl/style/parser.cpp +++ b/src/mbgl/style/parser.cpp @@ -11,6 +11,7 @@ #include <mbgl/style/layers/background_layer.hpp> #include <mbgl/style/rapidjson_conversion.hpp> #include <mbgl/style/conversion.hpp> +#include <mbgl/style/conversion/filter.hpp> #include <mbgl/platform/log.hpp> @@ -277,11 +278,11 @@ void Parser::parseLayer(const std::string& id, const JSValue& value, std::unique } if (value.HasMember("filter")) { - conversion::Result<Filter> filter = conversion::convertFilter(value["filter"]); - if (filter.is<Filter>()) { - impl->filter = filter.get<Filter>(); + conversion::Result<Filter> filter = conversion::convert<Filter>(value["filter"]); + if (filter) { + impl->filter = *filter; } else { - Log::Warning(Event::ParseStyle, filter.get<conversion::Error>().message); + Log::Warning(Event::ParseStyle, filter.error().message); } } |