mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +01:00
Move sectionInfo into sectionEndInfo when SECTION ends
When running `./tests/SelfTest -o /dev/null`, this saves 468 allocations (438907 -> 437439). In general, this saves 1 allocation every time an entered `SECTION` ends and the section name was long enough to move out of the SSO buffer.
This commit is contained in:
parent
c837cb4a8a
commit
d58491c85a
@ -25,7 +25,7 @@ namespace Catch {
|
||||
|
||||
Section::~Section() {
|
||||
if( m_sectionIncluded ) {
|
||||
SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() };
|
||||
SectionEndInfo endInfo{ CATCH_MOVE(m_info), m_assertions, m_timer.getElapsedSeconds() };
|
||||
if( uncaught_exceptions() )
|
||||
getResultCapture().sectionEndedEarly( endInfo );
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user