]> git.lyx.org Git - lyx.git/blobdiff - src/Author.cpp
Add test-refstyle-references to cmake. Also added missing file test-refstyle-referenc...
[lyx.git] / src / Author.cpp
index f1d346ea75619429cebd664ee4ea620097eb4f93..f4658e61269d020395d5e8d824d3be37ed86c2ce 100644 (file)
@@ -53,10 +53,11 @@ ostream & operator<<(ostream & os, Author const & a)
        // FIXME UNICODE
        os << a.buffer_id_ << " \"" << to_utf8(a.name_)
                        << "\" " << to_utf8(a.email_);
-               
+
        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)
@@ -85,7 +86,7 @@ int AuthorList::record(Author const & a)
        // If we record an author which equals the current
        // author, we copy the buffer_id, so that it will
        // keep the same id in the file.
-       if (authors_.size() > 0 && a == authors_[0])
+       if (!authors_.empty() && a == authors_[0])
                authors_[0].setBufferId(a.bufferId());
 
        Authors::const_iterator it(authors_.begin());
@@ -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();