aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ExternalLexer.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-10-17 09:06:39 +1100
committerNeil <nyamatongwe@gmail.com>2018-10-17 09:06:39 +1100
commitc832ba7c7debddc2c2e5475dbd0b203a17bda4c1 (patch)
tree97b64418e5ac671f704070d0e01fc892f5bed359 /src/ExternalLexer.cxx
parent918551c28d2d44aa5a18bc1cd520ab2e365325ec (diff)
downloadscintilla-mirror-c832ba7c7debddc2c2e5475dbd0b203a17bda4c1.tar.gz
Backport: Use nullptr and default brace initialisation for some simple cases.
Backport of changeset 7118:526318f7d6c7.
Diffstat (limited to 'src/ExternalLexer.cxx')
-rw-r--r--src/ExternalLexer.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx
index a8ed2fef5..4f2ab987b 100644
--- a/src/ExternalLexer.cxx
+++ b/src/ExternalLexer.cxx
@@ -64,7 +64,9 @@ LexerLibrary::LexerLibrary(const char *moduleName_) {
// Assign a buffer for the lexer name.
char lexname[100] = "";
GetLexerName(i, lexname, sizeof(lexname));
- ExternalLexerModule *lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL);
+ ExternalLexerModule *lex = new ExternalLexerModule(SCLEX_AUTOMATIC, nullptr, lexname, nullptr);
+ // This is storing a second reference to lex in the Catalogue as well as in modules.
+ // TODO: Should use std::shared_ptr or similar to ensure allocation safety.
Catalogue::AddLexerModule(lex);
// Remember ExternalLexerModule so we don't leak it