From cbb3a56c2ae7fca8b84a338e4acbbc47b81d9d96 Mon Sep 17 00:00:00 2001 From: Gali Nelle Date: Thu, 16 Apr 2020 13:31:29 +0300 Subject: Use unique_ptr for RenderLocationIndicatorImpl --- src/mbgl/renderer/layers/render_location_indicator_layer.cpp | 2 +- src/mbgl/renderer/layers/render_location_indicator_layer.hpp | 2 +- 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 _impl) : RenderLayer(makeMutable(std::move(_impl))), - renderImpl(new RenderLocationIndicatorImpl()), + renderImpl(std::make_unique()), 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 renderImpl; style::LocationIndicatorPaintProperties::Unevaluated unevaluated; }; -- cgit v1.2.1