diff options
| author | Martin Hořeňovský | 2023-02-19 23:53:34 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-02-20 15:17:35 +0100 |
| commit | 4f7c8cb28a0fdb4cc8b93f139b1b1e5d3ff0a328 (patch) | |
| tree | bb903b29161d70389a442157c43403031a21f3d3 /src/catch2/internal/catch_run_context.cpp | |
| parent | e1dbad4c9e9e5517c188cbd8af04cb6369851207 (diff) | |
| download | catch3-4f7c8cb28a0fdb4cc8b93f139b1b1e5d3ff0a328.tar.gz | |
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.
Diffstat (limited to 'src/catch2/internal/catch_run_context.cpp')
| -rw-r--r-- | src/catch2/internal/catch_run_context.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index 92d6d988..08086b28 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -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(); |