The branch, cleanup/updateMacros4, has been updated.

- Log -----------------------------------------------------------------

commit 1064ff801476e4ace4ca0d8997e877662f0b6e1f
Author: Richard Kimberly Heck <rikih...@lyx.org>
Date:   Tue Nov 17 02:33:41 2020 -0500

    Fix warnings

diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp
index 8cf9273..cfabd74 100644
--- a/src/mathed/MacroTable.cpp
+++ b/src/mathed/MacroTable.cpp
@@ -139,7 +139,7 @@ docstring const MacroData::xmlname() const
 
 char const * MacroData::MathMLtype() const
 {
-       return sym_ ? sym_->MathMLtype() : 0;
+       return sym_ ? sym_->MathMLtype() : nullptr;
 }
 
 
@@ -195,7 +195,7 @@ int MacroData::write(odocstream & os, bool 
overwriteRedefinition) const
 
        // find macro template
        Inset * inset = pos_.nextInset();
-       if (inset == 0 || inset->lyxCode() != MATHMACRO_CODE) {
+       if (!inset || inset->lyxCode() != MATHMACRO_CODE) {
                lyxerr << "BUG: No macro template found by MacroData" << endl;
                return 0;
        }
@@ -225,7 +225,7 @@ GlobalMacros & GlobalMacros::get()
 MacroData const * GlobalMacros::getMacro(docstring const & name) const
 {
        const_iterator it = find(name);
-       return it == end() ? 0 : &it->second;
+       return it == end() ? nullptr : &it->second;
 }
 
 

commit 21474387841f9a3bed6f388ee02ed85cfe3041c3
Author: Richard Kimberly Heck <rikih...@lyx.org>
Date:   Tue Nov 17 02:30:04 2020 -0500

    Fix warning

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index fafa0d8..efbf7f7 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -3669,7 +3669,7 @@ MacroData const * Buffer::Impl::getBufferMacro(docstring 
const & name,
 
        while (true) {
                // do we know something better (i.e. later) already?
-               if (it->first < bestPos )
+               if (it->first < bestPos)
                        break;
 
                // scope ends behind pos?
diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp
index e6daac6..8cf9273 100644
--- a/src/mathed/MacroTable.cpp
+++ b/src/mathed/MacroTable.cpp
@@ -179,7 +179,7 @@ void MacroData::updateData() const
 
        // find macro template
        Inset * inset = pos_.nextInset();
-       if (inset == 0 || inset->lyxCode() != MATHMACRO_CODE) {
+       if (!inset || inset->lyxCode() != MATHMACRO_CODE) {
                lyxerr << "BUG: No macro template found by MacroData" << endl;
                return;
        }

commit 7a72792228c665d0fc7d4dc641393d61081b4fe3
Author: Richard Kimberly Heck <rikih...@lyx.org>
Date:   Tue Nov 17 01:39:59 2020 -0500

    No problems in two years. Do not need to run updateMacros there.

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index b5d9e4f..fafa0d8 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -4959,8 +4959,6 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType 
utype) const
                // we will be re-doing the counters and references and such.
                textclass.counters().reset();
                clearReferenceCache();
-               // we should not need to do this again?
-               // updateMacros();
                updateBuffer(parit, utype);
                // this will already have been done by reloadBibInfoCache();
                // d->bibinfo_cache_valid_ = true;

-----------------------------------------------------------------------

Summary of changes:
 src/Buffer.cpp            |    4 +---
 src/mathed/MacroTable.cpp |    8 ++++----
 2 files changed, 5 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Repository for new features
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to