diff --git a/src/catch2/interfaces/catch_interfaces_capture.hpp b/src/catch2/interfaces/catch_interfaces_capture.hpp index c1900b7b..96c1f50e 100644 --- a/src/catch2/interfaces/catch_interfaces_capture.hpp +++ b/src/catch2/interfaces/catch_interfaces_capture.hpp @@ -44,7 +44,7 @@ namespace Catch { virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; virtual auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; - virtual void trackGeneratorState( GeneratorInfo info ) = 0; + virtual void trackGeneratorState( GeneratorInfo const& info ) = 0; virtual void benchmarkPreparing( StringRef name ) = 0; virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index 06906d5a..3fff19dd 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -319,7 +319,7 @@ namespace Catch { return tracker; } - void RunContext::trackGeneratorState( GeneratorInfo info ) { + void RunContext::trackGeneratorState( GeneratorInfo const& info ) { // Avoid redundant entries, in case a generator is used within a loop. if ( std::find( m_generatorInfos.cbegin(), m_generatorInfos.cend(), diff --git a/src/catch2/internal/catch_run_context.hpp b/src/catch2/internal/catch_run_context.hpp index 1c6684c5..b004545b 100644 --- a/src/catch2/internal/catch_run_context.hpp +++ b/src/catch2/internal/catch_run_context.hpp @@ -74,7 +74,7 @@ namespace Catch { void sectionEndedEarly( SectionEndInfo const& endInfo ) override; auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; - void trackGeneratorState( GeneratorInfo info ) override; + void trackGeneratorState( GeneratorInfo const& info ) override; void benchmarkPreparing( StringRef name ) override; void benchmarkStarting( BenchmarkInfo const& info ) override;