From f9fe785094923069cae4e379a0635b89324136ca Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 29 Sep 2018 08:15:12 +1000 Subject: Use nullptr when simple. --- src/Editor.cxx | 12 ++++++------ 1 file 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(wParam))) { - const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast(wParam)); - NotifyModified(pdoc, mh, NULL); + const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, nullptr, static_cast(wParam)); + NotifyModified(pdoc, mh, nullptr); } break; case SCI_ADDTABSTOP: if (view.AddTabstop(static_cast(wParam), static_cast(lParam))) { - const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast(wParam)); - NotifyModified(pdoc, mh, NULL); + const DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, nullptr, static_cast(wParam)); + NotifyModified(pdoc, mh, nullptr); } break; -- cgit v1.2.3