Clean up extraneous copies in Messages

This removes 109 allocations from running `tests/SelfTest`
(437057 -> 436948).
This commit is contained in:
Martin Hořeňovský
2023-01-28 22:14:37 +01:00
parent 356dfc1439
commit 906552f8c8
6 changed files with 11 additions and 13 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ namespace Catch {
////////////////////////////////////////////////////////////////////////////
ScopedMessage::ScopedMessage( MessageBuilder const& builder ):
m_info( builder.m_info ) {
ScopedMessage::ScopedMessage( MessageBuilder&& builder ):
m_info( CATCH_MOVE(builder.m_info) ) {
m_info.message = builder.m_stream.str();
getResultCapture().pushScopedMessage( m_info );
}