Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/interfaces/catch_interfaces_reporter.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-01-28 13:00:24 +0100
committerMartin Hořeňovský2023-01-28 13:00:30 +0100
commit2403f5620e60b41d84e35a88bacbb8bd8e1d92a8 (patch)
treeb26a699a75f717f8dec9a8b86dbaf35556bd0956 /src/catch2/interfaces/catch_interfaces_reporter.cpp
parentd58491c85a534a9348634ac3e4eb384df22f4d71 (diff)
downloadcatch3-2403f5620e60b41d84e35a88bacbb8bd8e1d92a8.tar.gz
Move SectionEndInfo into sectionEnded call in SECTION's destructor
When running `./tests/SelfTest -o /dev/null`, this saves 1272 allocations (437439 -> 437167). In general, this saves multiple allocations per end of an entered `SECTION`, if the section name was too long for SSO, because `RunContext::sectionEnded` can then move the section's name further down the callstack.
Diffstat (limited to 'src/catch2/interfaces/catch_interfaces_reporter.cpp')
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.cpp b/src/catch2/interfaces/catch_interfaces_reporter.cpp
index 0bcf66df..8c8bac54 100644
--- a/src/catch2/interfaces/catch_interfaces_reporter.cpp
+++ b/src/catch2/interfaces/catch_interfaces_reporter.cpp
@@ -67,11 +67,11 @@ namespace Catch {
}
}
- SectionStats::SectionStats( SectionInfo const& _sectionInfo,
+ SectionStats::SectionStats( SectionInfo&& _sectionInfo,
Counts const& _assertions,
double _durationInSeconds,
bool _missingAssertions )
- : sectionInfo( _sectionInfo ),
+ : sectionInfo( CATCH_MOVE(_sectionInfo) ),
assertions( _assertions ),
durationInSeconds( _durationInSeconds ),
missingAssertions( _missingAssertions )