summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Wojciechowski <lucas@mapbox.com>2018-02-21 14:29:29 -0800
committerLucas Wojciechowski <lucas@mapbox.com>2018-03-07 11:46:17 -0800
commitbf59bc637a09333051bdbf60a8c153f81c7c5188 (patch)
treeafc74da59dfc106431b85c3ca2c1eb5dac68850b
parentf4eb02aebc94fb16b9e87c711e7c62b077e294e7 (diff)
downloadqtlocation-mapboxgl-bf59bc637a09333051bdbf60a8c153f81c7c5188.tar.gz
Fix benchmark compilation
-rw-r--r--benchmark/parse/filter.benchmark.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/benchmark/parse/filter.benchmark.cpp b/benchmark/parse/filter.benchmark.cpp
index 4984668400..20267df867 100644
--- a/benchmark/parse/filter.benchmark.cpp
+++ b/benchmark/parse/filter.benchmark.cpp
@@ -6,6 +6,7 @@
#include <mbgl/style/conversion/json.hpp>
#include <mbgl/style/conversion/filter.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
+#include <mbgl/benchmark/stub_geometry_tile_feature.hpp>
using namespace mbgl;
@@ -22,15 +23,10 @@ static void Parse_Filter(benchmark::State& state) {
static void Parse_EvaluateFilter(benchmark::State& state) {
const style::Filter filter = parse(R"FILTER(["==", "foo", "bar"])FILTER");
- const PropertyMap properties = { { "foo", std::string("bar") } };
+ const StubGeometryTileFeature feature = { {}, FeatureType::Unknown , {}, {{ "foo", std::string("bar") }} };
while (state.KeepRunning()) {
- filter(FeatureType::Unknown, {}, [&] (const std::string& key) -> optional<Value> {
- auto it = properties.find(key);
- if (it == properties.end())
- return {};
- return it->second;
- });
+ filter(feature);
}
}