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. --- qt/ScintillaEditBase/PlatQt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt/ScintillaEditBase/PlatQt.cpp') diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index 2488d9687..7451a3077 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -1042,9 +1042,9 @@ ListWidget *ListBoxImpl::GetWidget() const noexcept ListBox::ListBox() noexcept {} ListBox::~ListBox() {} -ListBox *ListBox::Allocate() +std::unique_ptr ListBox::Allocate() { - return new ListBoxImpl(); + return std::make_unique(); } ListWidget::ListWidget(QWidget *parent) : QListWidget(parent), delegate(nullptr) -- cgit v1.2.3