From cd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Thu, 28 Nov 2019 18:19:17 +0200 Subject: [core][android][darwin] Fix GeoJSONOptions handling - share the `GeoJSONOptions` instances using `Immutable` - avoid extra copying - fix wrapping of the `GeoJSONOptions` instances in supercluster map/reduce lambdas. Previously, local variables were wrapped by reference. --- test/style/source.test.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test/style/source.test.cpp') 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(source.baseImpl)}; @@ -879,4 +877,4 @@ TEST(Source, GeoJSONSourceTilesAfterDataReset) { static_cast(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 +} -- cgit v1.2.1