summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGali Nelle <galinelle.mapbox@gmail.com>2020-04-16 13:31:29 +0300
committergalinelle <paolo.angelelli@mapbox.com>2020-04-17 16:52:56 +0300
commitcbb3a56c2ae7fca8b84a338e4acbbc47b81d9d96 (patch)
treebe1651a74eb9c018265ad760a3ce90e730df8eb4
parentefe604c3920d6383c572f908fc0d0420551b703a (diff)
downloadqtlocation-mapboxgl-cbb3a56c2ae7fca8b84a338e4acbbc47b81d9d96.tar.gz
Use unique_ptr for RenderLocationIndicatorImpl
-rw-r--r--src/mbgl/renderer/layers/render_location_indicator_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_location_indicator_layer.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/renderer/layers/render_location_indicator_layer.cpp b/src/mbgl/renderer/layers/render_location_indicator_layer.cpp
index 99eef054f9..933f674b89 100644
--- a/src/mbgl/renderer/layers/render_location_indicator_layer.cpp
+++ b/src/mbgl/renderer/layers/render_location_indicator_layer.cpp
@@ -709,7 +709,7 @@ inline const LocationIndicatorLayer::Impl& impl(const Immutable<style::Layer::Im
RenderLocationIndicatorLayer::RenderLocationIndicatorLayer(Immutable<style::LocationIndicatorLayer::Impl> _impl)
: RenderLayer(makeMutable<LocationIndicatorLayerProperties>(std::move(_impl))),
- renderImpl(new RenderLocationIndicatorImpl()),
+ renderImpl(std::make_unique<RenderLocationIndicatorImpl>()),
unevaluated(impl(baseImpl).paint.untransitioned()) {
assert(gfx::BackendScope::exists());
}
diff --git a/src/mbgl/renderer/layers/render_location_indicator_layer.hpp b/src/mbgl/renderer/layers/render_location_indicator_layer.hpp
index 739e814790..0adb328df9 100644
--- a/src/mbgl/renderer/layers/render_location_indicator_layer.hpp
+++ b/src/mbgl/renderer/layers/render_location_indicator_layer.hpp
@@ -23,7 +23,7 @@ private:
void render(PaintParameters &) override;
bool contextDestroyed = false;
- RenderLocationIndicatorImpl *renderImpl = nullptr;
+ std::unique_ptr<RenderLocationIndicatorImpl> renderImpl;
style::LocationIndicatorPaintProperties::Unevaluated unevaluated;
};