From 30e8720a235014e96125f9142e5c0a7e628526ce Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Mar 2021 16:55:13 +1100 Subject: Use unique_ptr for ListBox::Allocate to show transfer of ownership. --- gtk/PlatGTK.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 95cc9e509..2f37cf62d 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1234,9 +1234,8 @@ public: void SetList(const char *listText, char separator, char typesep) override; }; -ListBox *ListBox::Allocate() { - ListBoxX *lb = new ListBoxX(); - return lb; +std::unique_ptr ListBox::Allocate() { + return std::make_unique(); } static int treeViewGetRowHeight(GtkTreeView *view) { -- cgit v1.2.3