aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/AutoComplete.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-22 09:16:08 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-22 09:16:08 +1000
commitb201e09daf251a0e3e5576b79643f6c4f841a4a9 (patch)
treebc7d0caf7e5a4d0635b7ee7ba593f4ee830a6072 /src/AutoComplete.cxx
parent0801e0084a5cf87f424235d5947f5158474d5da4 (diff)
downloadscintilla-mirror-b201e09daf251a0e3e5576b79643f6c4f841a4a9.tar.gz
Using unique_ptr to simplify ownership of images, case folder, and list box.
Diffstat (limited to 'src/AutoComplete.cxx')
-rw-r--r--src/AutoComplete.cxx5
1 files changed, 1 insertions, 4 deletions
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;
}
}