Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_session.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-01-25 15:32:56 +0100
committerMartin Hořeňovský2020-01-25 17:41:38 +0100
commitdf2379218b634e0c1b21b49ea56354a2102d4cd1 (patch)
tree6bc3a1184eed8325a6855bf5788f5c195e079c21 /src/catch2/catch_session.cpp
parent7134ad9913a1bc206726b9f1c057e1e625a08c27 (diff)
downloadcatch3-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.cpp6
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)) {