Hold exception translators by unique_ptr
- and removed range deleters
This commit is contained in:
parent
cb6963216f
commit
46bf7605f4
4 changed files with 5 additions and 15 deletions
|
@ -16,11 +16,10 @@
|
|||
namespace Catch {
|
||||
|
||||
ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {
|
||||
deleteAll( m_translators );
|
||||
}
|
||||
|
||||
void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator* translator ) {
|
||||
m_translators.push_back( translator );
|
||||
m_translators.push_back( std::unique_ptr<const IExceptionTranslator>( translator ) );
|
||||
}
|
||||
|
||||
std::string ExceptionTranslatorRegistry::translateActiveException() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue