Internal Code Change
PiperOrigin-RevId: 518213370 Change-Id: I88d0acc195dadf8d03cd15c8534c721141db14ea
This commit is contained in:
		
				
					committed by
					
						
						Copybara-Service
					
				
			
			
				
	
			
			
			
						parent
						
							fa87209829
						
					
				
				
					commit
					e9faae170f
				
			@@ -563,7 +563,7 @@ namespace internal {
 | 
				
			|||||||
// If the explanation is not empty, prints it to the ostream.
 | 
					// If the explanation is not empty, prints it to the ostream.
 | 
				
			||||||
inline void PrintIfNotEmpty(const std::string& explanation,
 | 
					inline void PrintIfNotEmpty(const std::string& explanation,
 | 
				
			||||||
                            ::std::ostream* os) {
 | 
					                            ::std::ostream* os) {
 | 
				
			||||||
  if (explanation != "" && os != nullptr) {
 | 
					  if (!explanation.empty() && os != nullptr) {
 | 
				
			||||||
    *os << ", " << explanation;
 | 
					    *os << ", " << explanation;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -2966,7 +2966,7 @@ class KeyMatcherImpl : public MatcherInterface<PairType> {
 | 
				
			|||||||
    const bool match = inner_matcher_.MatchAndExplain(
 | 
					    const bool match = inner_matcher_.MatchAndExplain(
 | 
				
			||||||
        pair_getters::First(key_value, Rank0()), &inner_listener);
 | 
					        pair_getters::First(key_value, Rank0()), &inner_listener);
 | 
				
			||||||
    const std::string explanation = inner_listener.str();
 | 
					    const std::string explanation = inner_listener.str();
 | 
				
			||||||
    if (explanation != "") {
 | 
					    if (!explanation.empty()) {
 | 
				
			||||||
      *listener << "whose first field is a value " << explanation;
 | 
					      *listener << "whose first field is a value " << explanation;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return match;
 | 
					    return match;
 | 
				
			||||||
@@ -3113,12 +3113,12 @@ class PairMatcherImpl : public MatcherInterface<PairType> {
 | 
				
			|||||||
                      const std::string& second_explanation,
 | 
					                      const std::string& second_explanation,
 | 
				
			||||||
                      MatchResultListener* listener) const {
 | 
					                      MatchResultListener* listener) const {
 | 
				
			||||||
    *listener << "whose both fields match";
 | 
					    *listener << "whose both fields match";
 | 
				
			||||||
    if (first_explanation != "") {
 | 
					    if (!first_explanation.empty()) {
 | 
				
			||||||
      *listener << ", where the first field is a value " << first_explanation;
 | 
					      *listener << ", where the first field is a value " << first_explanation;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (second_explanation != "") {
 | 
					    if (!second_explanation.empty()) {
 | 
				
			||||||
      *listener << ", ";
 | 
					      *listener << ", ";
 | 
				
			||||||
      if (first_explanation != "") {
 | 
					      if (!first_explanation.empty()) {
 | 
				
			||||||
        *listener << "and ";
 | 
					        *listener << "and ";
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        *listener << "where ";
 | 
					        *listener << "where ";
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user