diff options
| author | Martin Hořeňovský | 2023-01-28 00:35:40 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-01-29 10:44:20 +0100 |
| commit | 65ffee518944372b35a885aa521ac28406f8b8fb (patch) | |
| tree | f2d8fb8db2bbdc03de542f99329c610c5c0224d3 /src/catch2/interfaces | |
| parent | 43f02027e47310e200f20f5c3a1de6fe281e2f81 (diff) | |
| download | catch3-65ffee518944372b35a885aa521ac28406f8b8fb.tar.gz | |
Don't take ownership of SECTION's name for inactive sections
This eliminates 1945 (432709 -> 430764) allocations from running
`./tests/SelfTest -o /dev/null`. In general terms, this saves
an allocation every time an unvisited `SECTION` is passed, which
means that the saved allocations are quadratic in number of sibling
(same level) `SECTION`s in a test case.
Diffstat (limited to 'src/catch2/interfaces')
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_capture.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_capture.hpp b/src/catch2/interfaces/catch_interfaces_capture.hpp index a6f83fa5..2a469c12 100644 --- a/src/catch2/interfaces/catch_interfaces_capture.hpp +++ b/src/catch2/interfaces/catch_interfaces_capture.hpp @@ -44,8 +44,9 @@ namespace Catch { public: virtual ~IResultCapture(); - virtual bool sectionStarted( SectionInfo const& sectionInfo, - Counts& assertions ) = 0; + virtual bool sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) = 0; virtual void sectionEnded( SectionEndInfo&& endInfo ) = 0; virtual void sectionEndedEarly( SectionEndInfo&& endInfo ) = 0; |