Changeset 759 for trunk/bin


Ignore:
Timestamp:
Jan 29, 2009, 12:51:35 PM (13 years ago)
Author:
Peter Johansson
Message:

Change container in SVNlog to be std::set<Commitment>, in order to
avoid copying in SVNlog::operator+=. Previously we had vector, but the
index had no meaning, in other words, the random access was not used.

refs #74

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/svndigest.cc

    r749 r759  
    166166      std::vector<std::string> dates;
    167167      dates.reserve(log.commits().size());
    168       for (size_t i=0; i<log.commits().size(); ++i) {
    169         assert(static_cast<svn_revnum_t>(i)==log.commits()[i].revision());
    170         dates.push_back(log.commits()[i].date());
     168      size_t rev = 0;
     169      for (SVNlog::container::const_iterator iter=log.commits().begin();
     170           iter!=log.commits().end(); ++iter) {
     171        assert(static_cast<svn_revnum_t>(rev)==iter->revision());
     172        assert(++rev);
     173        dates.push_back(iter->date());
    171174      }
    172       GnuplotFE::instance()->set_dates(dates);
    173175    }
    174176    if (chdir(option->targetdir().c_str()) ) {
Note: See TracChangeset for help on using the changeset viewer.