Use count function instead of handwritten loop
This commit is contained in:
		@@ -78,17 +78,7 @@ const char* TypedTestSuitePState::VerifyRegisteredTestNames(
 | 
			
		||||
      continue;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool found = false;
 | 
			
		||||
    for (RegisteredTestIter it = registered_tests_.begin();
 | 
			
		||||
         it != registered_tests_.end();
 | 
			
		||||
         ++it) {
 | 
			
		||||
      if (name == it->first) {
 | 
			
		||||
        found = true;
 | 
			
		||||
        break;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (found) {
 | 
			
		||||
    if (registered_tests_.count(name) != 0) {
 | 
			
		||||
      tests.insert(name);
 | 
			
		||||
    } else {
 | 
			
		||||
      errors << "No test named " << name
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user