mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Avoid needless copy in handling fatal errors
This commit is contained in:
		| @@ -484,8 +484,8 @@ namespace Catch { | ||||
|         // Best effort cleanup for sections that have not been destructed yet | ||||
|         // Since this is a fatal error, we have not had and won't have the opportunity to destruct them properly | ||||
|         while (!m_activeSections.empty()) { | ||||
|             auto nl = m_activeSections.back()->nameAndLocation(); | ||||
|             SectionEndInfo endInfo{ SectionInfo(CATCH_MOVE(nl.location), CATCH_MOVE(nl.name)), {}, 0.0 }; | ||||
|             auto const& nl = m_activeSections.back()->nameAndLocation(); | ||||
|             SectionEndInfo endInfo{ SectionInfo(nl.location, nl.name), {}, 0.0 }; | ||||
|             sectionEndedEarly(CATCH_MOVE(endInfo)); | ||||
|         } | ||||
|         handleUnfinishedSections(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský