Use make_unique when registering an exception translator

This commit is contained in:
Martin Hořeňovský 2021-08-21 21:32:15 +02:00
parent 928ecbaccf
commit 0a8516aeea
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 1 additions and 3 deletions

View File

@ -49,9 +49,7 @@ namespace Catch {
template<typename T>
ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) {
getMutableRegistryHub().registerTranslator(
Detail::unique_ptr<IExceptionTranslator>(
new ExceptionTranslator<T>( translateFunction )
)
Detail::make_unique<ExceptionTranslator<T>>(translateFunction)
);
}
};