summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-28 18:19:17 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-29 09:53:28 +0200
commitcd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb (patch)
tree42e601f7b16a83a62a8418511b795b6dfcf9eeff /test/api
parente3d1daaf6687467ee5c064d2577d2903c508c2dc (diff)
downloadqtlocation-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')
-rw-r--r--test/api/query.test.cpp6
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);