diff options
| author | Martin Hořeňovský | 2021-08-21 21:32:15 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-08-21 21:32:15 +0200 |
| commit | 0a8516aeeac9e3e683a0638b2cdae2fb0c126bfa (patch) | |
| tree | 1334aa605f6ce1240fb0b19e6b3658cfe3c5c40a | |
| parent | 928ecbaccf7f4ae8dfae2c1a649e2ee461bcb450 (diff) | |
| download | catch3-0a8516aeeac9e3e683a0638b2cdae2fb0c126bfa.tar.gz | |
Use make_unique when registering an exception translator
| -rw-r--r-- | src/catch2/catch_translate_exception.hpp | 4 |
1 files changed, 1 insertions, 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<typename T> ExceptionTranslatorRegistrar( std::string(*translateFunction)( T const& ) ) { getMutableRegistryHub().registerTranslator( - Detail::unique_ptr<IExceptionTranslator>( - new ExceptionTranslator<T>( translateFunction ) - ) + Detail::make_unique<ExceptionTranslator<T>>(translateFunction) ); } }; |