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/style | |
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/style')
-rw-r--r-- | test/style/source.test.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp index a02935f93f..5eb837d92b 100644 --- a/test/style/source.test.cpp +++ b/test/style/source.test.cpp @@ -852,10 +852,8 @@ TEST(Source, RenderTileSetSourceUpdate) { TEST(Source, GeoJSONSourceTilesAfterDataReset) { SourceTest test; GeoJSONSource source("source"); - auto geoJSONData = GeoJSONData::create( - mapbox::geojson::parse( - R"({"geometry": {"type": "Point", "coordinates": [1.1, 1.1]}, "type": "Feature", "properties": {}})"), - {}); + auto geoJSONData = GeoJSONData::create(mapbox::geojson::parse( + R"({"geometry": {"type": "Point", "coordinates": [1.1, 1.1]}, "type": "Feature", "properties": {}})")); source.setGeoJSONData(geoJSONData); RenderGeoJSONSource renderSource{staticImmutableCast<GeoJSONSource::Impl>(source.baseImpl)}; @@ -879,4 +877,4 @@ TEST(Source, GeoJSONSourceTilesAfterDataReset) { static_cast<RenderSource&>(renderSource) .update(source.baseImpl, layers, true, true, test.tileParameters(MapMode::Static)); EXPECT_TRUE(renderSource.isLoaded()); // Tiles are reset in static mode. -}
\ No newline at end of file +} |