]> git.lyx.org Git - features.git/commitdiff
nullptr
authorRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 17 Nov 2020 06:15:45 +0000 (01:15 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 17 Nov 2020 06:15:45 +0000 (01:15 -0500)
src/mathed/MathData.cpp

index 39d5f80184303c7f02f5813c7d90296af1d66f8d..2b74cac118093d7d0f0576dacffce68206f75d03 100644 (file)
@@ -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()