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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/interfaces
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-01-28 00:35:40 +0100
committerMartin Hořeňovský2023-01-29 10:44:20 +0100
commit65ffee518944372b35a885aa521ac28406f8b8fb (patch)
treef2d8fb8db2bbdc03de542f99329c610c5c0224d3 /src/catch2/interfaces
parent43f02027e47310e200f20f5c3a1de6fe281e2f81 (diff)
downloadcatch3-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.hpp5
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;