mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Avoid recalculating string-literal size on root tracker construction
This is a tiiiiiiny performance optimization, but it's free.
This commit is contained in:
		@@ -50,7 +50,8 @@ namespace TestCaseTracking {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    ITracker& TrackerContext::startRun() {
 | 
			
		||||
        m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, nullptr );
 | 
			
		||||
        using namespace std::string_literals;
 | 
			
		||||
        m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( "{root}"s, CATCH_INTERNAL_LINEINFO ), *this, nullptr );
 | 
			
		||||
        m_currentTracker = nullptr;
 | 
			
		||||
        m_runState = Executing;
 | 
			
		||||
        return *m_rootTracker;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user