Removed unnecessary use of ostringstream from catch_enforce.h

This commit is contained in:
Phil Nash 2018-02-15 13:59:02 +00:00
parent e84768fff1
commit bb84f0788a

View File

@ -11,10 +11,9 @@
#include "catch_stream.h" #include "catch_stream.h"
#include <stdexcept> #include <stdexcept>
#include <iosfwd>
#define CATCH_PREPARE_EXCEPTION( type, msg ) \ #define CATCH_PREPARE_EXCEPTION( type, msg ) \
type( static_cast<std::ostringstream&&>( Catch::ReusableStringStream().get() << msg ).str() ) type( ( Catch::ReusableStringStream() << msg ).str() )
#define CATCH_INTERNAL_ERROR( msg ) \ #define CATCH_INTERNAL_ERROR( msg ) \
throw CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg); throw CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg);
#define CATCH_ERROR( msg ) \ #define CATCH_ERROR( msg ) \