aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/LexerModule.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-16 16:57:48 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-16 16:57:48 +1000
commit89206d94f9095ab9e3c9a8c0e5f3556c2d4b7333 (patch)
treea6dc0fee046ed65719bcb9cd96b2ed8334efb895 /lexlib/LexerModule.cxx
parentd6ebb097f16792bb33e9cf094a3907fbca1ecfda (diff)
downloadscintilla-mirror-89206d94f9095ab9e3c9a8c0e5f3556c2d4b7333.tar.gz
Move implementations into cxx file.
Replace 0 and NULL with nullptr. Update comments.
Diffstat (limited to 'lexlib/LexerModule.cxx')
-rw-r--r--lexlib/LexerModule.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/lexlib/LexerModule.cxx b/lexlib/LexerModule.cxx
index fa4a349c1..a03be30ef 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;