diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-17 16:55:13 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-17 16:55:13 +1100 |
commit | 30e8720a235014e96125f9142e5c0a7e628526ce (patch) | |
tree | 5e9e6d35a9d563e0c481b8983a5f1ce6fce08614 /gtk/PlatGTK.cxx | |
parent | d5b1240eece116b2a13b635d25b041bf0de19305 (diff) | |
download | scintilla-mirror-30e8720a235014e96125f9142e5c0a7e628526ce.tar.gz |
Use unique_ptr for ListBox::Allocate to show transfer of ownership.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rwxr-xr-x | gtk/PlatGTK.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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> ListBox::Allocate() { + return std::make_unique<ListBoxX>(); } static int treeViewGetRowHeight(GtkTreeView *view) { |