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:
3 files changed
+7
-7
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user