Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-08-21 21:32:15 +0200
committerMartin Hořeňovský2021-08-21 21:32:15 +0200
commit0a8516aeeac9e3e683a0638b2cdae2fb0c126bfa (patch)
tree1334aa605f6ce1240fb0b19e6b3658cfe3c5c40a /src/catch2
parent928ecbaccf7f4ae8dfae2c1a649e2ee461bcb450 (diff)
downloadcatch3-0a8516aeeac9e3e683a0638b2cdae2fb0c126bfa.tar.gz
Use make_unique when registering an exception translator
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/catch_translate_exception.hpp4
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)
);
}
};