Some constness, following Yuriy

This commit is contained in:
Richard Kimberly Heck 2020-11-01 17:37:19 -05:00
parent 1fdcd7bf14
commit 679ce23ddc
3 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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,