From c24110790c646f40c307c88656c3eca7ed134e01 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 16 May 2018 16:57:48 +1000 Subject: Backport: Move implementations into cxx file. Replace 0 and NULL with nullptr. Update comments. Backport of changeset 6955:440e02c389df. --- lexlib/LexerModule.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'lexlib/LexerModule.cxx') 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; -- cgit v1.2.3