summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGali Nelle <galinelle.mapbox@gmail.com>2020-04-16 13:31:29 +0300
committerGali Nelle <galinelle.mapbox@gmail.com>2020-04-16 17:50:50 +0300
commit91845073073fc9f9f52e1fd2000bc3cc1d39253f (patch)
treee9cc5823b8aa53bc4f193877bbaf9b0683ab3d29
parent545a09fcb383595f8a012a2504cd61a924ca62ac (diff)
downloadqtlocation-mapboxgl-upstream/galinelle_locationIndicatorPointer.tar.gz
Use unique_ptr for RenderLocationIndicatorImplupstream/galinelle_locationIndicatorPointer
-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;
};