forked from catchorg/Catch2
Use make_unique when registering an exception translator
This commit is contained in:
@@ -49,9 +49,7 @@ namespace Catch {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) {
|
ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) {
|
||||||
getMutableRegistryHub().registerTranslator(
|
getMutableRegistryHub().registerTranslator(
|
||||||
Detail::unique_ptr<IExceptionTranslator>(
|
Detail::make_unique<ExceptionTranslator<T>>(translateFunction)
|
||||||
new ExceptionTranslator<T>( translateFunction )
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user