Changeset 703 for trunk/lib/Stats.cc
- Timestamp:
- Nov 24, 2008, 4:58:58 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Stats.cc
r693 r703 67 67 svn_revnum_t rev) const 68 68 { 69 assert(rev>0); 69 70 if (vec.empty()){ 70 71 // just to allow call to vec.back() below 71 72 vec.resize(1,0); 72 73 } 73 else if (vec.begin()+rev < vec.end())74 std::partial_sum(vec.begin()+rev ,vec.end(),vec.begin()+rev);74 else if (vec.begin()+rev-1 < vec.end()) 75 std::partial_sum(vec.begin()+rev-1,vec.end(),vec.begin()+rev-1); 75 76 // static_cast to remove annoying compiler warning 76 77 if (vec.size() < static_cast<size_t>(revision()+1)) … … 81 82 void Stats::accumulate_stats(svn_revnum_t rev) 82 83 { 84 if (!rev) 85 rev = 1; 83 86 for (std::set<std::string>::const_iterator iter(authors().begin()); 84 87 iter!=authors().end(); ++iter) {
Note: See TracChangeset
for help on using the changeset viewer.