summaryrefslogtreecommitdiff
path: root/src/mbgl/style/parser.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-22 12:31:49 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-24 09:39:15 -0700
commit089c4e413fbe80711ebd874520d3b8fdcb997112 (patch)
treea8088b0ed6cbd36b5cadf247a6e0fc524b6c3a3d /src/mbgl/style/parser.cpp
parentcb6a519f7c1e59b584b84039ebf4803c1d7eee71 (diff)
downloadqtlocation-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.cpp9
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);
}
}