]> git.lyx.org Git - features.git/commitdiff
DocBook: authorsToDocBookAuthorGroup never needs to return anything.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Fri, 1 Mar 2024 12:32:17 +0000 (13:32 +0100)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Fri, 1 Mar 2024 12:32:17 +0000 (13:32 +0100)
src/BiblioInfo.cpp
src/BiblioInfo.h

index a9245c6a77c6435dd2355bfe2b9570f2cf69a1bf..0f697ab297beb80717b70d8b00cc09d937fe8b32 100644 (file)
@@ -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 <personname>. If more structure is known, use it; otherwise (just "et al."), print it as such.
+               // All authors go in a <personname>. 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
index f4051bf2251a7b526d0de0306bdae7971e1db753..7a8ffb90813eb260f2cbca30f1c543cd476e986f 100644 (file)
@@ -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 <authorgroup> (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