From fffaf64ee3a512867550da7aba302f784ad393e3 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Tue, 17 Nov 2020 01:15:45 -0500 Subject: [PATCH] nullptr --- src/mathed/MathData.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp index 39d5f80184..2b74cac118 100644 --- a/src/mathed/MathData.cpp +++ b/src/mathed/MathData.cpp @@ -403,8 +403,8 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc, { // If we are editing a macro, we cannot update it immediately, // otherwise wrong undo steps will be recorded (bug 6208). - InsetMath const * inmath = cur ? cur->inset().asInsetMath() : 0; - InsetMathMacro const * inmacro = inmath ? inmath->asMacro() : 0; + InsetMath const * inmath = cur ? cur->inset().asInsetMath() : nullptr; + InsetMathMacro const * inmacro = inmath ? inmath->asMacro() : nullptr; docstring const edited_name = inmacro ? inmacro->name() : docstring(); // go over the array and look for macros @@ -533,7 +533,7 @@ void MathData::detachMacroParameters(DocIterator * cur, const size_type macroPos size_t j = 0; // We do not want to use macroInset below, the insert() call in // the loop will invalidate it. - macroInset = 0; + macroInset = nullptr; for (; j < detachedArgs.size() && j < optionals; ++j) { // another non-empty parameter follows? bool canDropEmptyOptional = j >= lastNonEmptyOptional; @@ -551,7 +551,7 @@ void MathData::detachMacroParameters(DocIterator * cur, const size_type macroPos MathData & arg = detachedArgs[j]; // look for "]", i.e. put a brace around? - InsetMathBrace * brace = 0; + InsetMathBrace * brace = nullptr; for (size_t q = 0; q < arg.size(); ++q) { if (arg[q]->getChar() == ']') { // put brace @@ -708,7 +708,7 @@ void MathData::collectOptionalParameters(Cursor * cur, size_t & pos, MathAtom & scriptToPutAround, const pos_type macroPos, const int thisPos, const int thisSlice) { - Buffer * buf = cur ? cur->buffer() : 0; + Buffer * buf = cur ? cur->buffer() : nullptr; // insert optional arguments? while (params.size() < numOptionalParams && pos < size() -- 2.39.5