Changeset 1280 for trunk/lib/Stats.cc


Ignore:
Timestamp:
Nov 6, 2010, 3:45:23 PM (11 years ago)
Author:
Peter Johansson
Message:

merged release 0.9 in to trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/Stats.cc

    r1255 r1280  
    440440    assert(stat->size());
    441441    assert(stat->find("all")!=stat->end());
    442     // FIXME: try keep a const& to avoid copying
    443     SumVector total=get_vector(*stat, "all");   
    444     total.resize(revision()+1);
     442    const SumVector& total=get_vector(*stat, "all");   
    445443    double yrange_max=1.03 * max_element(total) +1.0;
    446444    gp.ymax(yrange_max);
     
    452450         i != authors_.end(); ++i) {
    453451      assert(stat->find(*i)!=stat->end());
    454       // FIXME: avoid this copying?
    455       SumVector vec = get_vector(*stat,*i);
    456       vec.resize(revision()+1);
     452      const SumVector& vec = get_vector(*stat,*i);
    457453      if (max_element(vec)) {
    458454        author_cont.push_back(std::make_pair(*i,vec));
Note: See TracChangeset for help on using the changeset viewer.