Avoid copying NameAndLocationRef when passed as argument

`NameAndLocationRef` is pretty large type, so even in release build,
it is unlikely to be passed in registers. In addition to the fact
that some platforms currently do not allow passing even small types
in register (Windows ABI!!), it is better to pass it as a ref,
effectively passing around a pointer.
This commit is contained in:
Martin Hořeňovský committed 2023-02-20 15:17:35 +01:00
1 parent e1dbad4c9e
commit 4f7c8cb28a
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ namespace Catch {
{}
~GeneratorTracker() override;
static GeneratorTracker* acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocationRef nameAndLocation ) {
static GeneratorTracker* acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocationRef const& nameAndLocation ) {
GeneratorTracker* tracker;
ITracker& currentTracker = ctx.currentTracker();