mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 14:09:33 +01:00 
			
		
		
		
	Use StringRef to pass comparison operator name to BinaryExpr
Some nominally C++11 platforms do not have SSO (I am looking at you libstdc++), where this avoids meaningless allocations.
This commit is contained in:
		@@ -11,7 +11,7 @@
 | 
			
		||||
 | 
			
		||||
namespace Catch {
 | 
			
		||||
 | 
			
		||||
    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, std::string const& op, std::string const& rhs ) {
 | 
			
		||||
    void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
 | 
			
		||||
        if( lhs.size() + rhs.size() < 40 &&
 | 
			
		||||
                lhs.find('\n') == std::string::npos &&
 | 
			
		||||
                rhs.find('\n') == std::string::npos )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user