]> git.lyx.org Git - lyx.git/blobdiff - src/Author.cpp
Natbib authoryear uses (Ref1; Ref2) by default.
[lyx.git] / src / Author.cpp
index 12f7137a5f7587a66ee6732dc5ea9351c52c7078..6c608327e135c0d2e12ecc25569a2059af2ac640 100644 (file)
@@ -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)
@@ -101,6 +102,7 @@ int AuthorList::record(Author const & a)
 
 void AuthorList::record(int id, Author const & a)
 {
+       // LASSERT: What should we do here?
        LASSERT(unsigned(id) < authors_.size(), /**/);
 
        authors_[id] = a;
@@ -116,6 +118,7 @@ void AuthorList::recordCurrentAuthor(Author const & a)
 
 Author const & AuthorList::get(int id) const
 {
+       // LASSERT: What should we do here?
        LASSERT(id < (int)authors_.size() , /**/);
        return authors_[id];
 }
@@ -133,12 +136,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();