From: Thibaut Cuvelier Date: Fri, 1 Mar 2024 12:32:17 +0000 (+0100) Subject: DocBook: authorsToDocBookAuthorGroup never needs to return anything. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3973bbcf9915ad16cdd7dec3c20bd2f722dfb52e;p=features.git DocBook: authorsToDocBookAuthorGroup never needs to return anything. --- diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index a9245c6a77..0f697ab297 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -1748,7 +1748,7 @@ string citationStyleToString(const CitationStyle & cs, bool const latex) } -docstring authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream & xs, Buffer const & buf) +void authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream & xs, Buffer const & buf) { // This function closely mimics getAuthorList, but produces DocBook instead of text. // It has been greatly simplified, as the complete list of authors is always produced. No separators are required, @@ -1756,7 +1756,7 @@ docstring authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream // constructName has also been merged within, as it becomes really simple and leads to no copy-paste. if (authorsString.empty()) { - return docstring(); + return; } // Split the input list of authors into individual authors. @@ -1776,9 +1776,10 @@ docstring authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream xs << xml::CR(); xs << xml::StartTag("personname"); xs << xml::CR(); - docstring name = *it; + const docstring name = *it; - // All authors go in a . If more structure is known, use it; otherwise (just "et al."), print it as such. + // All authors go in a . If more structure is known, use it; otherwise (just "et al."), + // print it as such. if (name == "others") { xs << buf.B_(etal); } else { @@ -1818,8 +1819,6 @@ docstring authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream } xs << xml::EndTag("authorgroup"); xs << xml::CR(); - - return docstring(); } } // namespace lyx diff --git a/src/BiblioInfo.h b/src/BiblioInfo.h index f4051bf225..7a8ffb9081 100644 --- a/src/BiblioInfo.h +++ b/src/BiblioInfo.h @@ -37,7 +37,7 @@ CitationStyle citationStyleFromString(std::string const & latex_str, std::string citationStyleToString(CitationStyle const &, bool const latex = false); /// Transforms the information about authors into a (directly written to a XMLStream). -docstring authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream & xs, Buffer const & buf); +void authorsToDocBookAuthorGroup(docstring const & authorsString, XMLStream & xs, Buffer const & buf); /// Class to represent information about a BibTeX or