Use parent constructor where applicable in reporters

This commit is contained in:
Martin Hořeňovský 2022-04-12 22:27:12 +02:00
parent d698776ec5
commit 61f803126d
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
4 changed files with 4 additions and 12 deletions

View File

@ -14,9 +14,7 @@ namespace Catch {
class AutomakeReporter final : public StreamingReporterBase { class AutomakeReporter final : public StreamingReporterBase {
public: public:
AutomakeReporter( ReporterConfig const& _config ) using StreamingReporterBase::StreamingReporterBase;
: StreamingReporterBase( _config )
{}
~AutomakeReporter() override; ~AutomakeReporter() override;

View File

@ -89,8 +89,7 @@ namespace Catch {
using TestCaseNode = Node<TestCaseStats, SectionNode>; using TestCaseNode = Node<TestCaseStats, SectionNode>;
using TestRunNode = Node<TestRunStats, TestCaseNode>; using TestRunNode = Node<TestRunStats, TestCaseNode>;
CumulativeReporterBase( ReporterConfig const& _config ): using ReporterBase::ReporterBase;
ReporterBase( _config ) {}
~CumulativeReporterBase() override; ~CumulativeReporterBase() override;
void benchmarkPreparing( StringRef ) override {} void benchmarkPreparing( StringRef ) override {}

View File

@ -29,9 +29,7 @@ namespace Catch {
void updatePreferences(IEventListener const& reporterish); void updatePreferences(IEventListener const& reporterish);
public: public:
MultiReporter( IConfig const* config ): using IEventListener::IEventListener;
IEventListener( config )
{}
void addListener( IEventListenerPtr&& listener ); void addListener( IEventListenerPtr&& listener );
void addReporter( IEventListenerPtr&& reporter ); void addReporter( IEventListenerPtr&& reporter );

View File

@ -18,10 +18,7 @@ namespace Catch {
class StreamingReporterBase : public ReporterBase { class StreamingReporterBase : public ReporterBase {
public: public:
StreamingReporterBase( ReporterConfig const& _config ): using ReporterBase::ReporterBase;
ReporterBase( _config ) {}
~StreamingReporterBase() override; ~StreamingReporterBase() override;
void benchmarkPreparing( StringRef ) override {} void benchmarkPreparing( StringRef ) override {}