diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-16 16:57:48 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-16 16:57:48 +1000 |
commit | c24110790c646f40c307c88656c3eca7ed134e01 (patch) | |
tree | 6c080822ab9cf08e25541fa7ef07d99913b3a481 /lexlib/LexerModule.cxx | |
parent | 27f9d447ab961b5ec314a290622afdb12ab5f0e2 (diff) | |
download | scintilla-mirror-c24110790c646f40c307c88656c3eca7ed134e01.tar.gz |
Backport: Move implementations into cxx file.
Replace 0 and NULL with nullptr.
Update comments.
Backport of changeset 6955:440e02c389df.
Diffstat (limited to 'lexlib/LexerModule.cxx')
-rw-r--r-- | lexlib/LexerModule.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lexlib/LexerModule.cxx b/lexlib/LexerModule.cxx index 6bf894144..30e8cf041 100644 --- a/lexlib/LexerModule.cxx +++ b/lexlib/LexerModule.cxx @@ -34,7 +34,7 @@ LexerModule::LexerModule(int language_, language(language_), fnLexer(fnLexer_), fnFolder(fnFolder_), - fnFactory(0), + fnFactory(nullptr), wordListDescriptions(wordListDescriptions_), lexClasses(lexClasses_), nClasses(nClasses_), @@ -46,8 +46,8 @@ LexerModule::LexerModule(int language_, const char *languageName_, const char * const wordListDescriptions_[]) : language(language_), - fnLexer(0), - fnFolder(0), + fnLexer(nullptr), + fnFolder(nullptr), fnFactory(fnFactory_), wordListDescriptions(wordListDescriptions_), lexClasses(nullptr), @@ -55,8 +55,15 @@ LexerModule::LexerModule(int language_, languageName(languageName_) { } +LexerModule::~LexerModule() { +} + +int LexerModule::GetLanguage() const { + return language; +} + int LexerModule::GetNumWordLists() const { - if (wordListDescriptions == NULL) { + if (!wordListDescriptions) { return -1; } else { int numWordLists = 0; @@ -106,7 +113,7 @@ void LexerModule::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initS // Move back one line in case deletion wrecked current line fold state if (lineCurrent > 0) { lineCurrent--; - Sci_Position newStartPos = styler.LineStart(lineCurrent); + const Sci_Position newStartPos = styler.LineStart(lineCurrent); lengthDoc += startPos - newStartPos; startPos = newStartPos; initStyle = 0; |