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 /win32/PlatWin.cxx | |
parent | d5b1240eece116b2a13b635d25b041bf0de19305 (diff) | |
download | scintilla-mirror-30e8720a235014e96125f9142e5c0a7e628526ce.tar.gz |
Use unique_ptr for ListBox::Allocate to show transfer of ownership.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 00b5c59c5..7b5ece752 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2573,9 +2573,8 @@ public: static LRESULT PASCAL StaticWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); }; -ListBox *ListBox::Allocate() { - ListBoxX *lb = new ListBoxX(); - return lb; +std::unique_ptr<ListBox> ListBox::Allocate() { + return std::make_unique<ListBoxX>(); } void ListBoxX::Create(Window &parent_, int ctrlID_, Point location_, int lineHeight_, bool unicodeMode_, int technology_) { |