mirror of
https://github.com/catchorg/Catch2.git
synced 2025-07-19 23:25:32 +02:00
Avoid needless copy in handling fatal errors
This commit is contained in:
parent
066f00acf5
commit
895b8af6bd
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user