From: Scott Kostyshak Date: Mon, 16 Dec 2019 04:36:17 +0000 (-0500) Subject: Correct typo in method name getDescendants() X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ce974e0c7ff76f2aaa73bd0b3562631f40839cdb;p=features.git 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 --- 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; }