From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/mTextControl/src/fancy_rtf.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/mTextControl/src/fancy_rtf.cpp') diff --git a/plugins/mTextControl/src/fancy_rtf.cpp b/plugins/mTextControl/src/fancy_rtf.cpp index 17f5f76dba..6aacfe0362 100644 --- a/plugins/mTextControl/src/fancy_rtf.cpp +++ b/plugins/mTextControl/src/fancy_rtf.cpp @@ -85,14 +85,14 @@ static bool bbCodeImageFunc(IFormattedTextDraw *ftd, CHARRANGE range, wchar_t *t static BBCodeInfo bbCodes[] = { - { L"[b]", 0, bbCodeSimpleFunc, BBS_BOLD_S }, - { L"[/b]", 0, bbCodeSimpleFunc, BBS_BOLD_E }, - { L"[i]", 0, bbCodeSimpleFunc, BBS_ITALIC_S }, - { L"[/i]", 0, bbCodeSimpleFunc, BBS_ITALIC_E }, - { L"[u]", 0, bbCodeSimpleFunc, BBS_UNDERLINE_S }, - { L"[/u]", 0, bbCodeSimpleFunc, BBS_UNDERLINE_E }, - { L"[s]", 0, bbCodeSimpleFunc, BBS_STRIKEOUT_S }, - { L"[/s]", 0, bbCodeSimpleFunc, BBS_STRIKEOUT_E }, + { L"[b]", nullptr, bbCodeSimpleFunc, BBS_BOLD_S }, + { L"[/b]", nullptr, bbCodeSimpleFunc, BBS_BOLD_E }, + { L"[i]", nullptr, bbCodeSimpleFunc, BBS_ITALIC_S }, + { L"[/i]", nullptr, bbCodeSimpleFunc, BBS_ITALIC_E }, + { L"[u]", nullptr, bbCodeSimpleFunc, BBS_UNDERLINE_S }, + { L"[/u]", nullptr, bbCodeSimpleFunc, BBS_UNDERLINE_E }, + { L"[s]", nullptr, bbCodeSimpleFunc, BBS_STRIKEOUT_S }, + { L"[/s]", nullptr, bbCodeSimpleFunc, BBS_STRIKEOUT_E }, // { L"[color=", L"]", bbCodeSimpleFunc, BBS_COLOR_S }, // { L"[/color]", 0, bbCodeSimpleFunc, BBS_COLOR_E } @@ -115,8 +115,8 @@ void bbCodeParse(IFormattedTextDraw *ftd) for (bool found = true; found;) { found = false; CHARRANGE fRange; fRange.cpMin = -1; - wchar_t *fText = 0; - BBCodeInfo *fBBCode = NULL; + wchar_t *fText = nullptr; + BBCodeInfo *fBBCode = nullptr; for (int i = 0; i < bbCodeCount; i++) { CHARRANGE range; -- cgit v1.2.3