diff options
| author | Martin Hořeňovský | 2020-05-19 17:37:09 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-20 20:25:49 +0200 |
| commit | 668454b36b6be8d7f0d4d2ce8122654899052526 (patch) | |
| tree | c8785e8391633e42daa479501234b15be48c8426 /src/catch2/catch_session.cpp | |
| parent | 458241cc90b71de453fb40bfeed9ccce20d45ee9 (diff) | |
| download | catch3-668454b36b6be8d7f0d4d2ce8122654899052526.tar.gz | |
Do not share ownership of Config in RunContext
Diffstat (limited to 'src/catch2/catch_session.cpp')
| -rw-r--r-- | src/catch2/catch_session.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index c3bf898b..f82c8ea0 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -61,7 +61,7 @@ namespace Catch { class TestGroup { public: - explicit TestGroup(IStreamingReporterPtr&& reporter, std::shared_ptr<Config> const& config): + explicit TestGroup(IStreamingReporterPtr&& reporter, Config const* config): m_reporter(reporter.get()), m_config{config}, m_context{config, std::move(reporter)} { @@ -111,7 +111,7 @@ namespace Catch { using Tests = std::set<TestCaseHandle const*>; IStreamingReporter* m_reporter; - std::shared_ptr<Config> m_config; + Config const* m_config; RunContext m_context; Tests m_tests; TestSpec::Matches m_matches; @@ -284,7 +284,7 @@ namespace Catch { return 0; } - TestGroup tests { std::move(reporter), m_config }; + TestGroup tests { std::move(reporter), m_config.get() }; auto const totals = tests.execute(); if( m_config->warnAboutNoTests() && totals.error == -1 ) |