diff options
author | Neil <nyamatongwe@gmail.com> | 2018-09-29 08:15:12 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-09-29 08:15:12 +1000 |
commit | f9fe785094923069cae4e379a0635b89324136ca (patch) | |
tree | ef680a017679f92a62f0b4a52ddf333847cc9d98 | |
parent | 4e3bcb1c183a255cf957425bd3c95e5d4acbfd16 (diff) | |
download | scintilla-mirror-f9fe785094923069cae4e379a0635b89324136ca.tar.gz |
Use nullptr when simple.
-rw-r--r-- | src/Editor.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 8c5f249eb..862acf696 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5204,7 +5204,7 @@ void Editor::SetDocPointer(Document *document) { //Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document); pdoc->RemoveWatcher(this, 0); pdoc->Release(); - if (document == NULL) { + if (!document) { pdoc = new Document(SC_DOCUMENTOPTION_DEFAULT); } else { pdoc = document; @@ -5523,7 +5523,7 @@ void Editor::NeedShown(Sci::Position pos, Sci::Position len) { } Sci::Position Editor::GetTag(char *tagValue, int tagNumber) { - const char *text = 0; + const char *text = nullptr; Sci::Position length = 0; if ((tagNumber >= 1) && (tagNumber <= 9)) { char name[3] = "\\?"; @@ -6501,15 +6501,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_CLEARTABSTOPS: if (view.ClearTabstops(static_cast<Sci::Line>(wParam))) { - const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast<Sci::Line>(wParam)); - NotifyModified(pdoc, mh, NULL); + const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, nullptr, static_cast<Sci::Line>(wParam)); + NotifyModified(pdoc, mh, nullptr); } break; case SCI_ADDTABSTOP: if (view.AddTabstop(static_cast<Sci::Line>(wParam), static_cast<int>(lParam))) { - const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast<Sci::Line>(wParam)); - NotifyModified(pdoc, mh, NULL); + const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, nullptr, static_cast<Sci::Line>(wParam)); + NotifyModified(pdoc, mh, nullptr); } break; |