Do not use shared_ptr<Config> when listing things

This commit is contained in:
Martin Hořeňovský
2020-05-20 20:25:48 +02:00
parent fa160cf3f2
commit 458241cc90
3 changed files with 12 additions and 10 deletions
+7 -8
View File
@@ -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;
}