diff options
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 9a36412ed..c327206d8 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -442,12 +442,12 @@ int ScintillaBase::AutoCompleteGetCurrentText(char *buffer) const { const int item = ac.GetSelection(); if (item != -1) { const std::string selected = ac.GetValue(item); - if (buffer != NULL) + if (buffer) memcpy(buffer, selected.c_str(), selected.length()+1); return static_cast<int>(selected.length()); } } - if (buffer != NULL) + if (buffer) *buffer = '\0'; return 0; } @@ -592,7 +592,7 @@ public: } LexState::LexState(Document *pdoc_) : LexInterface(pdoc_) { - lexCurrent = 0; + lexCurrent = nullptr; performingStyle = false; interfaceVersion = lvOriginal; lexLanguage = SCLEX_CONTAINER; @@ -601,7 +601,7 @@ LexState::LexState(Document *pdoc_) : LexInterface(pdoc_) { LexState::~LexState() { if (instance) { instance->Release(); - instance = 0; + instance = nullptr; } } @@ -616,7 +616,7 @@ void LexState::SetLexerModule(const LexerModule *lex) { if (lex != lexCurrent) { if (instance) { instance->Release(); - instance = 0; + instance = nullptr; } interfaceVersion = lvOriginal; lexCurrent = lex; @@ -631,7 +631,7 @@ void LexState::SetLexerModule(const LexerModule *lex) { void LexState::SetLexer(uptr_t wParam) { lexLanguage = static_cast<int>(wParam); if (lexLanguage == SCLEX_CONTAINER) { - SetLexerModule(0); + SetLexerModule(nullptr); } else { const LexerModule *lex = Catalogue::Find(lexLanguage); if (!lex) @@ -653,7 +653,7 @@ const char *LexState::DescribeWordListSets() { if (instance) { return instance->DescribeWordListSets(); } else { - return 0; + return nullptr; } } @@ -674,7 +674,7 @@ void *LexState::PrivateCall(int operation, void *pointer) { if (pdoc && instance) { return instance->PrivateCall(operation, pointer); } else { - return 0; + return nullptr; } } @@ -682,7 +682,7 @@ const char *LexState::PropertyNames() { if (instance) { return instance->PropertyNames(); } else { - return 0; + return nullptr; } } @@ -698,7 +698,7 @@ const char *LexState::DescribeProperty(const char *name) { if (instance) { return instance->DescribeProperty(name); } else { - return 0; + return nullptr; } } @@ -805,7 +805,7 @@ const char *LexState::NameOfStyle(int style) { if (instance && (interfaceVersion >= lvMetaData)) { return static_cast<ILexerWithMetaData *>(instance)->NameOfStyle(style); } else { - return 0; + return nullptr; } } @@ -813,7 +813,7 @@ const char *LexState::TagsOfStyle(int style) { if (instance && (interfaceVersion >= lvMetaData)) { return static_cast<ILexerWithMetaData *>(instance)->TagsOfStyle(style); } else { - return 0; + return nullptr; } } @@ -821,7 +821,7 @@ const char *LexState::DescriptionOfStyle(int style) { if (instance && (interfaceVersion >= lvMetaData)) { return static_cast<ILexerWithMetaData *>(instance)->DescriptionOfStyle(style); } else { - return 0; + return nullptr; } } |