From b201e09daf251a0e3e5576b79643f6c4f841a4a9 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 22 Apr 2017 09:16:08 +1000 Subject: Using unique_ptr to simplify ownership of images, case folder, and list box. --- src/AutoComplete.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/AutoComplete.cxx') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index cc4b46dfa..1c847ce0f 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -33,7 +33,6 @@ AutoComplete::AutoComplete() : typesep('?'), ignoreCase(false), chooseSingle(false), - lb(0), posStart(0), startLen(0), cancelAtStartPos(true), @@ -43,14 +42,12 @@ AutoComplete::AutoComplete() : widthLBDefault(100), heightLBDefault(100), autoSort(SC_ORDER_PRESORTED) { - lb = ListBox::Allocate(); + lb.reset(ListBox::Allocate()); } AutoComplete::~AutoComplete() { if (lb) { lb->Destroy(); - delete lb; - lb = 0; } } -- cgit v1.2.3