static int computeHash(docstring const & name,
docstring const & email)
{
- string const full_author_string = to_ascii(name + email);
+ string const full_author_string = to_utf8(name + email);
// Bernstein's hash function
unsigned int hash = 5381;
for (unsigned int i = 0; i < full_author_string.length(); ++i)
- hash = ((hash << 5) + hash) + unsigned int(full_author_string[i]);
+ hash = ((hash << 5) + hash) + (unsigned int)(full_author_string[i]);
return int(hash);
}
ostream & operator<<(ostream & os, Author const & a)
{
// FIXME UNICODE
- os << a.buffer_id() << " \"" << to_utf8(a.name())
- << "\" " << to_utf8(a.email());
+ os << a.buffer_id_ << " \"" << to_utf8(a.name_)
+ << "\" " << to_utf8(a.email_);
return os;
}
bool author_smaller(Author const & lhs, Author const & rhs) {
- return lhs.buffer_id() < rhs.buffer_id();
+ return lhs.bufferId() < rhs.bufferId();
}
// author, we copy the buffer_id, so that it will
// keep the same id in the file.
if (authors_.size() > 0 && a == authors_[0])
- authors_[0].setBufferId(a.buffer_id());
+ authors_[0].setBufferId(a.bufferId());
Authors::const_iterator it(authors_.begin());
Authors::const_iterator itend(authors_.end());