diff options
| author | Zufu Liu <unknown> | 2019-09-30 12:15:31 +1000 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2019-09-30 12:15:31 +1000 |
| commit | 632bf5eb1f2825ac1c7f4c9850462ad1fe68990d (patch) | |
| tree | b1cf3d120610339493691d2f77514ece5b2132d3 /lexlib/LexerBase.cxx | |
| parent | 44b175314f0b875e6d3fa0664ad2c0133e4542f9 (diff) | |
| download | scintilla-mirror-632bf5eb1f2825ac1c7f4c9850462ad1fe68990d.tar.gz | |
Backport: Feature [feature-requests:#1305] Optimize setting up keyword lists in lexers.
Avoids splitting and sorting the input twice.
Backport of changeset 7697:f0848608c92c.
Diffstat (limited to 'lexlib/LexerBase.cxx')
| -rw-r--r-- | lexlib/LexerBase.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lexlib/LexerBase.cxx b/lexlib/LexerBase.cxx index 7b01beff4..655f96be6 100644 --- a/lexlib/LexerBase.cxx +++ b/lexlib/LexerBase.cxx @@ -75,10 +75,7 @@ const char * SCI_METHOD LexerBase::DescribeWordListSets() { Sci_Position SCI_METHOD LexerBase::WordListSet(int n, const char *wl) { if (n < numWordLists) { - WordList wlNew; - wlNew.Set(wl); - if (*keyWordLists[n] != wlNew) { - keyWordLists[n]->Set(wl); + if (keyWordLists[n]->Set(wl)) { return 0; } } |
