Hold exception translators by unique_ptr
- and removed range deleters
This commit is contained in:
1 parent
cb6963216f
commit
46bf7605f4
4 files changed
+5
-15
No files matched your search
@@ -18,7 +18,7 @@ namespace Catch {
|
||||
typedef std::string(*exceptionTranslateFunction)();
|
||||
|
||||
struct IExceptionTranslator;
|
||||
typedef std::vector<const IExceptionTranslator*> ExceptionTranslators;
|
||||
typedef std::vector<std::unique_ptr<IExceptionTranslator const>> ExceptionTranslators;
|
||||
|
||||
struct IExceptionTranslator {
|
||||
virtual ~IExceptionTranslator();
|
||||
@@ -40,7 +40,7 @@ namespace Catch {
|
||||
: m_translateFunction( translateFunction )
|
||||
{}
|
||||
|
||||
virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {
|
||||
std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {
|
||||
try {
|
||||
if( it == itEnd )
|
||||
throw;
|
||||
|
||||
Reference in new issue
Block a user