Changeset 1003 for trunk/lib/Stats.cc
- Timestamp:
- Jan 2, 2010, 3:35:57 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Stats.cc
r978 r1003 34 34 #include <cstdlib> 35 35 #include <fstream> 36 #include <iostream> 36 37 #include <iterator> 37 38 #include <map> … … 277 278 std::string str; 278 279 getline(is, str); 279 if (str!=cache_check_str()) 280 if (str!=cache_check_str()) { 281 if (str == prev_cache_check_str()) 282 std::cout << "cache file is obsolete; " 283 << "retrieving statistics from repository.\n"; 280 284 return 0; 285 } 281 286 svn_revnum_t rev; 282 287 is >> rev; … … 327 332 } 328 333 } 334 } 335 336 337 unsigned int Stats::max_element(const std::vector<unsigned int>& vec) const 338 { 339 return *std::max_element(vec.begin(), vec.end()); 329 340 } 330 341 … … 374 385 for (std::set<std::string>::const_iterator i=authors_.begin(); 375 386 i != authors_.end(); ++i) { 376 if (lines(*i)) { 377 assert(stat->find(*i)!=stat->end()); 378 author_cont.push_back(std::make_pair(*i,get_vector(*stat,*i))); 387 assert(stat->find(*i)!=stat->end()); 388 const std::vector<unsigned int>& vec = get_vector(*stat,*i); 389 if (max_element(vec)) { 390 author_cont.push_back(std::make_pair(*i,vec)); 379 391 } 380 392 }
Note: See TracChangeset
for help on using the changeset viewer.