forked from catchorg/Catch2
Hold reporter's IConfig instance in the interface
Previously, every base derived from the IStreamingReporter had its own `IConfig const* m_config` member, so this just centralizes the handling thereof. Part of #2061
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Catch {
|
||||
// doesn't compile without a std::move call. However, this causes
|
||||
// a warning on newer platforms. Thus, we have to work around
|
||||
// it a bit and downcast the pointer manually.
|
||||
auto ret = Detail::unique_ptr<IStreamingReporter>(new ListeningReporter);
|
||||
auto ret = Detail::unique_ptr<IStreamingReporter>(new ListeningReporter(config));
|
||||
auto& multi = static_cast<ListeningReporter&>(*ret);
|
||||
auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners();
|
||||
for (auto const& listener : listeners) {
|
||||
|
||||
Reference in New Issue
Block a user