aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-17 16:55:13 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-17 16:55:13 +1100
commit30e8720a235014e96125f9142e5c0a7e628526ce (patch)
tree5e9e6d35a9d563e0c481b8983a5f1ce6fce08614 /gtk/PlatGTK.cxx
parentd5b1240eece116b2a13b635d25b041bf0de19305 (diff)
downloadscintilla-mirror-30e8720a235014e96125f9142e5c0a7e628526ce.tar.gz
Use unique_ptr for ListBox::Allocate to show transfer of ownership.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rwxr-xr-xgtk/PlatGTK.cxx5
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) {