[LyX/master] Some constness, following Yuriy

Richard Kimberly Heck rikiheck at lyx.org
Sun Nov 1 22:12:34 UTC 2020


commit 679ce23ddc936b9254ab6158c52399637c5435f9
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Sun Nov 1 17:37:19 2020 -0500

    Some constness, following Yuriy
---
 src/Author.cpp  |    4 ++--
 src/Changes.cpp |    2 +-
 src/Changes.h   |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Author.cpp b/src/Author.cpp
index b4cf9fd..9007863 100644
--- a/src/Author.cpp
+++ b/src/Author.cpp
@@ -119,9 +119,9 @@ int AuthorList::record(Author const & a)
 		if (valid && *it == a)
 			return it - beg;
 		if (it->bufferId() == a.bufferId()) {
-			int id = it - beg;
+			int const id = it - beg;
 			if (!it->valid())
-				// we need to handle the case of a valid author being registred
+				// we need to handle the case of a valid author being registered
 				// after an invalid one. For instance, because "buffer-reload"
 				// does not clear the buffer's author list.
 				record(id, a);
diff --git a/src/Changes.cpp b/src/Changes.cpp
index 7e97a24..dfe04cd 100644
--- a/src/Changes.cpp
+++ b/src/Changes.cpp
@@ -502,7 +502,7 @@ void Changes::lyxMarkChange(ostream & os, BufferParams const & bparams, int & co
 }
 
 
-void Changes::checkAuthors(AuthorList const & authorList)
+void Changes::checkAuthors(AuthorList const & authorList) const
 {
 	for (ChangeRange const & cr : table_)
 		if (cr.change.type != Change::UNCHANGED)
diff --git a/src/Changes.h b/src/Changes.h
index 6146b5a..61e32b7 100644
--- a/src/Changes.h
+++ b/src/Changes.h
@@ -132,7 +132,7 @@ public:
 		int & column, Change const & old, Change const & change);
 
 	///
-	void checkAuthors(AuthorList const & authorList);
+	void checkAuthors(AuthorList const & authorList) const;
 
 	///
 	void addToToc(DocIterator const & cdit, Buffer const & buffer,


More information about the lyx-cvs mailing list