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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_list.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-05-19 17:29:24 +0200
committerMartin Hořeňovský2020-05-20 20:25:48 +0200
commit458241cc90b71de453fb40bfeed9ccce20d45ee9 (patch)
treee49787ee886cb6dad300874485b2e16a4a40d0a3 /src/catch2/internal/catch_list.cpp
parentfa160cf3f251ae6d1672b58fb19eb1af8adb81c6 (diff)
downloadcatch3-458241cc90b71de453fb40bfeed9ccce20d45ee9.tar.gz
Do not use shared_ptr<Config> when listing things
Diffstat (limited to 'src/catch2/internal/catch_list.cpp')
-rw-r--r--src/catch2/internal/catch_list.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/catch2/internal/catch_list.cpp b/src/catch2/internal/catch_list.cpp
index 11fb8150..b654c4c1 100644
--- a/src/catch2/internal/catch_list.cpp
+++ b/src/catch2/internal/catch_list.cpp
@@ -90,20 +90,19 @@ namespace Catch {
return out;
}
- bool list( IStreamingReporter& reporter, std::shared_ptr<Config> const& config ) {
+ bool list( IStreamingReporter& reporter, Config const& config ) {
bool listed = false;
- getCurrentMutableContext().setConfig( config );
- if (config->listTests()) {
+ if (config.listTests()) {
listed = true;
- listTests(reporter, *config);
+ listTests(reporter, config);
}
- if (config->listTags()) {
+ if (config.listTags()) {
listed = true;
- listTags(reporter, *config);
+ listTags(reporter, config);
}
- if (config->listReporters()) {
+ if (config.listReporters()) {
listed = true;
- listReporters(reporter, *config);
+ listReporters(reporter, config);
}
return listed;
}