Move-enable various parts of TextFlow

This removes about 200 pointless copies from printing the help
message (the original motivation for the change), and also nicely
improves performance of the various reporters that depend on
TextFlow.
This commit is contained in:
Martin Hořeňovský
2023-12-27 21:43:40 +01:00
parent eaafd07674
commit b52d97855d
4 changed files with 54 additions and 22 deletions

View File

@@ -366,8 +366,8 @@ namespace Catch {
optWidth = ( std::min )( optWidth, consoleWidth / 2 );
for ( auto const& cols : rows ) {
auto row = TextFlow::Column( cols.left )
for ( auto& cols : rows ) {
auto row = TextFlow::Column( CATCH_MOVE(cols.left) )
.width( optWidth )
.indent( 2 ) +
TextFlow::Spacer( 4 ) +