From 0a8516aeeac9e3e683a0638b2cdae2fb0c126bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 21 Aug 2021 21:32:15 +0200 Subject: [PATCH] Use make_unique when registering an exception translator --- src/catch2/catch_translate_exception.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/catch2/catch_translate_exception.hpp b/src/catch2/catch_translate_exception.hpp index 6053a10b..dfd95cd6 100644 --- a/src/catch2/catch_translate_exception.hpp +++ b/src/catch2/catch_translate_exception.hpp @@ -49,9 +49,7 @@ namespace Catch { template ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) { getMutableRegistryHub().registerTranslator( - Detail::unique_ptr( - new ExceptionTranslator( translateFunction ) - ) + Detail::make_unique>(translateFunction) ); } };