diff options
| author | Martin Hořeňovský | 2022-02-23 23:46:45 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-03-06 16:34:13 +0100 |
| commit | 61d0f7a9afb88c12f8931f80321e58f2cfbc62db (patch) | |
| tree | cdb5f8f3a86c99dd56c5dcb14a05b3f5751b1e9b /src/catch2/catch_session.cpp | |
| parent | 9b01c404f514782383ec064c57a0a8e7d326f476 (diff) | |
| download | catch3-61d0f7a9afb88c12f8931f80321e58f2cfbc62db.tar.gz | |
Pass the whole IStream wrapper into reporter
This will become useful when reworking colour support, because
Win32 colour support requires checking whether the output is
stdout, which is done through the `IStream` wrapper.
Diffstat (limited to 'src/catch2/catch_session.cpp')
| -rw-r--r-- | src/catch2/catch_session.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index a4a78bb6..f20531e3 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -44,7 +44,7 @@ namespace Catch { IStreamingReporterPtr makeReporter(Config const* config) { if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty() && config->getReportersAndOutputFiles().size() == 1) { - auto& stream = config->getReporterOutputStream(0); + auto stream = config->getReporterOutputStream(0); return createReporter(config->getReportersAndOutputFiles()[0].reporterName, ReporterConfig(config, stream)); } @@ -57,7 +57,7 @@ namespace Catch { std::size_t reporterIdx = 0; for (auto const& reporterAndFile : config->getReportersAndOutputFiles()) { - auto& stream = config->getReporterOutputStream(reporterIdx); + auto stream = config->getReporterOutputStream(reporterIdx); multi->addReporter(createReporter(reporterAndFile.reporterName, ReporterConfig(config, stream))); reporterIdx++; } |