converted IStreamingReporter to unique_ptr

This commit is contained in:
Phil Nash
2017-04-29 19:38:34 +01:00
parent ef8b72c949
commit 687437fcd1
5 changed files with 46 additions and 46 deletions

View File

@@ -59,11 +59,11 @@ namespace Catch {
public:
explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr const& reporter )
explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr&& reporter )
: m_runInfo( _config->name() ),
m_context( getCurrentMutableContext() ),
m_config( _config ),
m_reporter( reporter )
m_reporter( std::move( reporter ) )
{
m_context.setRunner( this );
m_context.setConfig( m_config );
@@ -131,6 +131,9 @@ namespace Catch {
IConfigPtr config() const {
return m_config;
}
IStreamingReporter& reporter() const {
return *m_reporter;
}
private: // IResultCapture