mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Use make_unique when registering an exception translator
This commit is contained in:
		| @@ -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) | ||||
|             ); | ||||
|         } | ||||
|     }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský