mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Compilation warnings fix (#791)
* Compilation warnings fix * Removed unused argument from reportFatal function
This commit is contained in:
parent
c390c4cb9f
commit
02a69b449f
@ -28,7 +28,7 @@ namespace Catch {
|
|||||||
return s.find( infix ) != std::string::npos;
|
return s.find( infix ) != std::string::npos;
|
||||||
}
|
}
|
||||||
bool contains( std::string const& s, char infix ) {
|
bool contains( std::string const& s, char infix ) {
|
||||||
return s.find(infix);
|
return s.find(infix) != std::string::npos;
|
||||||
}
|
}
|
||||||
char toLowerCh(char c) {
|
char toLowerCh(char c) {
|
||||||
return static_cast<char>( ::tolower( c ) );
|
return static_cast<char>( ::tolower( c ) );
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// Report the error condition
|
// Report the error condition
|
||||||
inline void reportFatal( std::string const& message, int exitCode ) {
|
inline void reportFatal( std::string const& message ) {
|
||||||
IContext& context = Catch::getCurrentContext();
|
IContext& context = Catch::getCurrentContext();
|
||||||
IResultCapture* resultCapture = context.getResultCapture();
|
IResultCapture* resultCapture = context.getResultCapture();
|
||||||
resultCapture->handleFatalErrorCondition( message );
|
resultCapture->handleFatalErrorCondition( message );
|
||||||
@ -49,7 +49,7 @@ namespace Catch {
|
|||||||
static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) {
|
static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) {
|
||||||
for (int i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) {
|
for (int i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) {
|
||||||
if (ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) {
|
if (ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) {
|
||||||
reportFatal(signalDefs[i].name, -i);
|
reportFatal(signalDefs[i].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If its not an exception we care about, pass it along.
|
// If its not an exception we care about, pass it along.
|
||||||
@ -122,7 +122,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset();
|
reset();
|
||||||
reportFatal(name, -sig);
|
reportFatal(name);
|
||||||
raise( sig );
|
raise( sig );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user