forked from catchorg/Catch2
Devirtualize handling of ReporterPreferences
The new scheme is that there is one protected member instance of `ReporterPreferences` in the `IStreamingReporter` base class, and derived classes can modify it to express their own preferences. Retrieving the preferences is now a non-virtual operation, which makes it much cheaper to read them frequently. Previously, we avoided doing so by caching the preferences in another variable, but we still read them at least once per test case run.
This commit is contained in:
@@ -23,8 +23,8 @@ namespace Catch {
|
||||
: StreamingReporterBase( _config ),
|
||||
m_xml(_config.stream())
|
||||
{
|
||||
m_reporterPrefs.shouldRedirectStdOut = true;
|
||||
m_reporterPrefs.shouldReportAllAssertions = true;
|
||||
m_preferences.shouldRedirectStdOut = true;
|
||||
m_preferences.shouldReportAllAssertions = true;
|
||||
}
|
||||
|
||||
XmlReporter::~XmlReporter() = default;
|
||||
|
Reference in New Issue
Block a user