Changeset 704 for trunk/lib/Stats.cc


Ignore:
Timestamp:
Nov 24, 2008, 6:17:46 AM (14 years ago)
Author:
Peter Johansson
Message:

avoid creating temporary object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Stats.cc

    r703 r704  
    511511    for (size_t i=0; i<stats_.size(); ++i){
    512512      stats_[i].clear();
    513       stats_[i]["all"]=std::vector<unsigned int>(revision_+1);
     513      std::vector<unsigned int>& tmp = stats_[i]["all"];
     514      std::fill(tmp.begin(), tmp.end(), 0);
     515      tmp.resize(revision_+1);
    514516    }
    515517    authors_.clear();
Note: See TracChangeset for help on using the changeset viewer.