aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/AutoComplete.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/AutoComplete.cxx')
-rw-r--r--src/AutoComplete.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx
index d45ab27a6..f9dbd4d67 100644
--- a/src/AutoComplete.cxx
+++ b/src/AutoComplete.cxx
@@ -11,7 +11,6 @@
#include "AutoComplete.h"
AutoComplete::AutoComplete() {
- lb = 0;
active = false;
posStart = 0;
strcpy(stopChars, "");
@@ -54,8 +53,7 @@ char AutoComplete::GetSeparator() {
return separator;
}
-int AutoComplete::SetList(const char *list) {
- int maxStrLen = 12;
+void AutoComplete::SetList(const char *list) {
lb.Clear();
char *words = new char[strlen(list) + 1];
if (words) {
@@ -66,18 +64,15 @@ int AutoComplete::SetList(const char *list) {
if (words[i] == separator) {
words[i] = '\0';
lb.Append(startword);
- maxStrLen = Platform::Maximum(maxStrLen, strlen(startword));
startword = words + i + 1;
}
}
if (startword) {
lb.Append(startword);
- maxStrLen = Platform::Maximum(maxStrLen, strlen(startword));
}
delete []words;
}
lb.Sort();
- return maxStrLen;
}
void AutoComplete::Show() {
@@ -88,7 +83,6 @@ void AutoComplete::Show() {
void AutoComplete::Cancel() {
if (lb.Created()) {
lb.Destroy();
- lb = 0;
active = false;
}
}