X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FAuthor.cpp;h=f4658e61269d020395d5e8d824d3be37ed86c2ce;hb=f51636b547b87b710f6a22e067e94f96d41c740f;hp=12f7137a5f7587a66ee6732dc5ea9351c52c7078;hpb=a756403301ff8fb78df4dc1e131e4cd50cd976e1;p=lyx.git diff --git a/src/Author.cpp b/src/Author.cpp index 12f7137a5f..f4658e6126 100644 --- a/src/Author.cpp +++ b/src/Author.cpp @@ -57,6 +57,7 @@ ostream & operator<<(ostream & os, Author const & a) return os; } + istream & operator>>(istream & is, Author & a) { string s; @@ -69,15 +70,15 @@ istream & operator>>(istream & is, Author & a) } -bool author_smaller(Author const & lhs, Author const & rhs) { +bool author_smaller(Author const & lhs, Author const & rhs) +{ return lhs.bufferId() < rhs.bufferId(); } AuthorList::AuthorList() : last_id_(0) -{ -} +{} int AuthorList::record(Author const & a) @@ -133,12 +134,14 @@ AuthorList::Authors::const_iterator AuthorList::end() const } -void AuthorList::sort() { +void AuthorList::sort() +{ std::sort(authors_.begin(), authors_.end(), author_smaller); } -ostream & operator<<(ostream & os, AuthorList const & a) { +ostream & operator<<(ostream & os, AuthorList const & a) +{ // Copy the authorlist, because we don't want to sort the original AuthorList sorted = a; sorted.sort();