mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Use make_unique instead of unique_ptr(new T) in more places
This commit is contained in:
parent
f9ec34ce01
commit
2ae28fc852
@ -14,7 +14,7 @@
|
||||
namespace Catch {
|
||||
|
||||
Detail::unique_ptr<ITestInvoker> makeTestInvoker( void(*testAsFunction)() ) {
|
||||
return Detail::unique_ptr<ITestInvoker>( new TestInvokerAsFunction( testAsFunction ));
|
||||
return Detail::make_unique<TestInvokerAsFunction>( testAsFunction );
|
||||
}
|
||||
|
||||
AutoReg::AutoReg( Detail::unique_ptr<ITestInvoker> invoker, SourceLineInfo const& lineInfo, StringRef classOrMethod, NameAndTags const& nameAndTags ) noexcept {
|
||||
|
@ -42,7 +42,7 @@ Detail::unique_ptr<ITestInvoker> makeTestInvoker( void(*testAsFunction)() );
|
||||
|
||||
template<typename C>
|
||||
Detail::unique_ptr<ITestInvoker> makeTestInvoker( void (C::*testAsMethod)() ) {
|
||||
return Detail::unique_ptr<ITestInvoker>( new TestInvokerAsMethod<C>(testAsMethod) );
|
||||
return Detail::make_unique<TestInvokerAsMethod<C>>( testAsMethod );
|
||||
}
|
||||
|
||||
struct NameAndTags {
|
||||
|
@ -354,7 +354,7 @@ public:
|
||||
|
||||
ConsoleReporter::ConsoleReporter(ReporterConfig const& config)
|
||||
: StreamingReporterBase(config),
|
||||
m_tablePrinter(new TablePrinter(config.stream(),
|
||||
m_tablePrinter(Detail::make_unique<TablePrinter>(config.stream(),
|
||||
[&config]() -> std::vector<ColumnInfo> {
|
||||
if (config.fullConfig()->benchmarkNoAnalysis())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user