summaryrefslogtreecommitdiff
path: root/benchmark/parse
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-10-16 15:40:07 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-10-16 17:14:19 -0700
commit12f78fc8747332a3d54763c9b0cc2e794eefb4f8 (patch)
treefb10590f6605226a16dc528965ba541ff9371ec4 /benchmark/parse
parentb8654b3b04599988f1f7a519853e98d4ca54cfd0 (diff)
downloadqtlocation-mapboxgl-12f78fc8747332a3d54763c9b0cc2e794eefb4f8.tar.gz
[core] Use convertJSON instead of RapidJSON directly
Diffstat (limited to 'benchmark/parse')
-rw-r--r--benchmark/parse/filter.benchmark.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/benchmark/parse/filter.benchmark.cpp b/benchmark/parse/filter.benchmark.cpp
index d650cb72c9..4984668400 100644
--- a/benchmark/parse/filter.benchmark.cpp
+++ b/benchmark/parse/filter.benchmark.cpp
@@ -2,20 +2,16 @@
#include <mbgl/style/filter.hpp>
#include <mbgl/style/filter_evaluator.hpp>
-#include <mbgl/style/rapidjson_conversion.hpp>
#include <mbgl/style/conversion.hpp>
+#include <mbgl/style/conversion/json.hpp>
#include <mbgl/style/conversion/filter.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
-#include <rapidjson/document.h>
-
using namespace mbgl;
style::Filter parse(const char* expression) {
- rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson::CrtAllocator> doc;
- doc.Parse<0>(expression);
style::conversion::Error error;
- return *style::conversion::convert<style::Filter, JSValue>(doc, error);
+ return *style::conversion::convertJSON<style::Filter>(expression, error);
}
static void Parse_Filter(benchmark::State& state) {