diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-28 18:19:17 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-29 09:53:28 +0200 |
commit | cd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb (patch) | |
tree | 42e601f7b16a83a62a8418511b795b6dfcf9eeff /test/api/query.test.cpp | |
parent | e3d1daaf6687467ee5c064d2577d2903c508c2dc (diff) | |
download | qtlocation-mapboxgl-cd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb.tar.gz |
[core][android][darwin] Fix GeoJSONOptions handling
- share the `GeoJSONOptions` instances using `Immutable<GeoJSONOptions>` - avoid extra copying
- fix wrapping of the `GeoJSONOptions` instances in supercluster map/reduce lambdas.
Previously, local variables were wrapped by reference.
Diffstat (limited to 'test/api/query.test.cpp')
-rw-r--r-- | test/api/query.test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp index 9116a3746d..63a2479b40 100644 --- a/test/api/query.test.cpp +++ b/test/api/query.test.cpp @@ -48,9 +48,9 @@ std::vector<Feature> getTopClusterFeature(QueryTest& test) { }; LatLng coordinate{0, 0}; - GeoJSONOptions options{}; - options.cluster = true; - auto source = std::make_unique<GeoJSONSource>("cluster_source"s, options); + Mutable<GeoJSONOptions> options = makeMutable<GeoJSONOptions>(); + options->cluster = true; + auto source = std::make_unique<GeoJSONSource>("cluster_source"s, std::move(options)); source->setURL("http://url"s); source->loadDescription(*test.fileSource); |