Changeset 704 for trunk/lib


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

avoid creating temporary object

Location:
trunk/lib
Files:
2 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();
  • trunk/lib/Stats.h

    r703 r704  
    9999
    100100    /**
    101        Do the parsing for \a path. Revisions from \a rv will be parsed.
     101       Do the parsing for \a path. Revisions from \a rev will be parsed.
    102102    */
    103103    void parse(const std::string& path, svn_revnum_t rev=0);
Note: See TracChangeset for help on using the changeset viewer.