From 79787c22748540b231e2a56684b90e5c878fdc3a Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sun, 15 Dec 2019 23:36:17 -0500 Subject: [PATCH] Correct typo in method name getDescendants() When used as an adjective, both variants "descendent" and "descendant" are acceptable, but when used as a noun only "descendant" should be used. For a reference, see here: https://en.wiktionary.org/wiki/descendent#Noun --- src/Buffer.cpp | 12 ++++++------ src/Buffer.h | 4 ++-- src/BufferEncodings.cpp | 2 +- src/BufferList.cpp | 2 +- src/insets/InsetBranch.cpp | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 0c0c9dfac7..6cebf5d7f6 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3125,7 +3125,7 @@ void Buffer::getLanguages(std::set & langs) const for (ParConstIterator it = par_iterator_begin(); it != end; ++it) it->getLanguages(langs); // also children - ListOfBuffers clist = getDescendents(); + ListOfBuffers clist = getDescendants(); for (auto const & cit : clist) cit->getLanguages(langs); } @@ -3494,7 +3494,7 @@ Buffer const * Buffer::parent() const ListOfBuffers Buffer::allRelatives() const { - ListOfBuffers lb = masterBuffer()->getDescendents(); + ListOfBuffers lb = masterBuffer()->getDescendants(); lb.push_front(const_cast(masterBuffer())); return lb; } @@ -3565,7 +3565,7 @@ ListOfBuffers Buffer::getChildren() const } -ListOfBuffers Buffer::getDescendents() const +ListOfBuffers Buffer::getDescendants() const { ListOfBuffers v; collectChildren(v, true); @@ -4395,7 +4395,7 @@ bool Buffer::autoSave() const void Buffer::setExportStatus(bool e) const { d->doing_export = e; - ListOfBuffers clist = getDescendents(); + ListOfBuffers clist = getDescendants(); for (auto const & bit : clist) bit->d->doing_export = e; } @@ -4606,7 +4606,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir else errors(error_type); // also to the children, in case of master-buffer-view - ListOfBuffers clist = getDescendents(); + ListOfBuffers clist = getDescendants(); for (auto const & bit : clist) { if (runparams.silent) bit->d->errorLists[error_type].clear(); @@ -4931,7 +4931,7 @@ void Buffer::Impl::traverseErrors(TeXErrors::Errors::const_iterator err, TeXErro tie(start, end) = p->texrow.getEntriesFromRow(errorRow); else { // The error occurred in a child - for (Buffer const * child : owner_->getDescendents()) { + for (Buffer const * child : owner_->getDescendants()) { string const child_name = DocFileName(changeExtension(child->absFileName(), "tex")). mangledFileName(); diff --git a/src/Buffer.h b/src/Buffer.h index 48ed0e7c36..7ed9f05d74 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -461,10 +461,10 @@ public: /// the children appear. ListOfBuffers getChildren() const; - /// \return a list of all descendents of this Buffer (children, + /// \return a list of all descendants of this Buffer (children, /// grandchildren, etc). this list has no duplicates and is in /// the order in which the children appear. - ListOfBuffers getDescendents() const; + ListOfBuffers getDescendants() const; /// Collect all relative buffers, in the order in which they appear. /// I.e., the "root" Buffer is first, then its first child, then any diff --git a/src/BufferEncodings.cpp b/src/BufferEncodings.cpp index 82fd3dc715..0604dfbd30 100644 --- a/src/BufferEncodings.cpp +++ b/src/BufferEncodings.cpp @@ -45,7 +45,7 @@ void BufferEncodings::initUnicodeMath(Buffer const & buffer, bool for_master) return; // Check children - ListOfBuffers blist = buffer.getDescendents(); + ListOfBuffers blist = buffer.getDescendants(); ListOfBuffers::const_iterator bit = blist.begin(); ListOfBuffers::const_iterator const bend = blist.end(); for (; bit != bend; ++bit) diff --git a/src/BufferList.cpp b/src/BufferList.cpp index 3865c72c8e..fe8caf8c1f 100644 --- a/src/BufferList.cpp +++ b/src/BufferList.cpp @@ -327,7 +327,7 @@ Buffer * BufferList::getBufferFromTmp(string const & s) if (suffixIs(s, master_name)) return buf; // if not, try with the children - for (Buffer * child : buf->getDescendents()) { + for (Buffer * child : buf->getDescendants()) { string const mangled_child_name = DocFileName( changeExtension(child->absFileName(), ".tex")).mangledFileName(); diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index ecce3796ce..6afa0c72ea 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -194,7 +194,7 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd) // if branch exists in a descendant, update previews. // TODO: only needed if "Show preview" is enabled in the included inset. bool exists_in_desc = false; - for (auto const & it : buf->getDescendents()) { + for (auto const & it : buf->getDescendants()) { if (it->params().branchlist().find(params_.branch)) exists_in_desc = true; }