summaryrefslogtreecommitdiff
path: root/test/api/custom_layer.test.cpp
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2018-03-05 14:16:15 -0500
committerJulian Rex <julian.rex@mapbox.com>2018-03-05 14:16:15 -0500
commitbcdf23028e93a8216fc6b877486a04ac5a579c58 (patch)
tree19d34a5388695f0d7a559f539cf1fbb10bd74b3d /test/api/custom_layer.test.cpp
parent6fb2a94c5e1be320cc88bf9ed822fbd297223c4b (diff)
downloadqtlocation-mapboxgl-bcdf23028e93a8216fc6b877486a04ac5a579c58.tar.gz
[macos] Updated MGLMapView with new layer manager.upstream/jrex-custom-layer-style-changed-leak
Diffstat (limited to 'test/api/custom_layer.test.cpp')
-rw-r--r--test/api/custom_layer.test.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp
index eb1d7e0d3a..0f6747c12e 100644
--- a/test/api/custom_layer.test.cpp
+++ b/test/api/custom_layer.test.cpp
@@ -96,14 +96,16 @@ TEST(CustomLayer, Basic) {
map.getStyle().addLayer(std::make_unique<CustomLayer>(
"custom",
[] (void* context) {
- reinterpret_cast<TestLayer*>(context)->initialize();
+ reinterpret_cast<TestLayer*>(context)->initialize();
},
[] (void* context, const CustomLayerRenderParameters&) {
- reinterpret_cast<TestLayer*>(context)->render();
+ reinterpret_cast<TestLayer*>(context)->render();
},
[] (void* context) {
- delete reinterpret_cast<TestLayer*>(context);
- }, new TestLayer()));
+ delete reinterpret_cast<TestLayer*>(context);
+ },
+ nullptr,
+ new TestLayer()));
auto layer = std::make_unique<FillLayer>("landcover", "mapbox");
layer->setSourceLayer("landcover");