diff options
| author | Martin Hořeňovský | 2020-01-25 15:32:56 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-01-25 17:41:38 +0100 |
| commit | df2379218b634e0c1b21b49ea56354a2102d4cd1 (patch) | |
| tree | 6bc3a1184eed8325a6855bf5788f5c195e079c21 /src/catch2/catch_session.cpp | |
| parent | 7134ad9913a1bc206726b9f1c057e1e625a08c27 (diff) | |
| download | catch3-df2379218b634e0c1b21b49ea56354a2102d4cd1.tar.gz | |
Reduce the use of shared_ptrs for various Config objects
Ideally they would not be used at all, but the main config lifetime
is a weird mess right now and will require further refactoring.
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 f086fb22..fd3e4f62 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -33,14 +33,14 @@ namespace Catch { namespace { const int MaxExitCode = 255; - IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) { + IStreamingReporterPtr createReporter(std::string const& reporterName, IConfig const* config) { auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config); CATCH_ENFORCE(reporter, "No reporter registered with name: '" << reporterName << "'"); return reporter; } - IStreamingReporterPtr makeReporter(std::shared_ptr<Config> const& config) { + IStreamingReporterPtr makeReporter(Config const* config) { if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) { return createReporter(config->getReporterName(), config); } @@ -273,7 +273,7 @@ namespace Catch { } // Create reporter(s) so we can route listings through them - auto reporter = makeReporter(m_config); + auto reporter = makeReporter(m_config.get()); // Handle list request if (list(*reporter, m_config)) { |