From 4ba2146cd1fee3df660b8088c47c0dd384130e88a7ddd81dc4e9acc21dca0385 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 18 Apr 2025 18:36:52 -0400 Subject: [PATCH] Plumb another pointer further... --- dw/layout.cc | 4 ++-- dw/layout.hh | 2 +- dw/ui.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dw/layout.cc b/dw/layout.cc index ca33285..a5b1758 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -255,9 +255,9 @@ Layout::Anchor::~Anchor () // --------------------------------------------------------------------- -Layout::Layout (Platform *platform, bool limit) +Layout::Layout (std::unique_ptr< Platform > platform, bool limit) { - this->platform = platform; + this->platform = platform.release(); view = NULL; topLevel = NULL; widgetAtPoint = NULL; diff --git a/dw/layout.hh b/dw/layout.hh index 5fa549d..2c4be30 100644 --- a/dw/layout.hh +++ b/dw/layout.hh @@ -260,7 +260,7 @@ private: void leaveResizeIdle () { resizeIdleCounter--; } public: - Layout (Platform *platform, bool limit=true); + Layout (std::unique_ptr< Platform > platform, bool limit=true); ~Layout (); inline void connectLink (LinkReceiver *receiver) diff --git a/dw/ui.cc b/dw/ui.cc index d28942d..3364cc4 100644 --- a/dw/ui.cc +++ b/dw/ui.cc @@ -345,7 +345,7 @@ void ComplexButtonResource::init (std::unique_ptr< Widget > widget) childWidget = widget.get(); /* FIXME: Buttons should not need a full Layout */ - layout = new Layout (createPlatform ().release(), false); + layout = new Layout (createPlatform (), false); setLayout (layout); DBG_OBJ_ASSOC_CHILD (layout); layout->setWidget (std::move( widget ));