Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal
diff options
context:
space:
mode:
authorKochetkov, Yuriy2022-01-24 12:40:22 +0300
committerMartin Hořeňovský2022-03-24 15:49:02 +0100
commit7882f7359e276c55eea144c284c7860cb06daf31 (patch)
tree30e3640fc7cd59608ec999b5a4d5b1c576a789e2 /src/catch2/internal
parent0e176c318bf309aaa4acd8686a82517fda7b859a (diff)
downloadcatch3-7882f7359e276c55eea144c284c7860cb06daf31.tar.gz
Remove unnecessary casts
May break the logic in case of WinAPI changes with no warnings Signed-off-by: Kochetkov, Yuriy <yuriyx.kochetkov@intel.com>
Diffstat (limited to 'src/catch2/internal')
-rw-r--r--src/catch2/internal/catch_fatal_condition_handler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/catch2/internal/catch_fatal_condition_handler.cpp b/src/catch2/internal/catch_fatal_condition_handler.cpp
index 7d3534ca..60cecd7a 100644
--- a/src/catch2/internal/catch_fatal_condition_handler.cpp
+++ b/src/catch2/internal/catch_fatal_condition_handler.cpp
@@ -78,10 +78,10 @@ namespace Catch {
// Windows can easily distinguish between SO and SigSegV,
// but SigInt, SigTerm, etc are handled differently.
static SignalDefs signalDefs[] = {
- { static_cast<DWORD>(EXCEPTION_ILLEGAL_INSTRUCTION), "SIGILL - Illegal instruction signal" },
- { static_cast<DWORD>(EXCEPTION_STACK_OVERFLOW), "SIGSEGV - Stack overflow" },
- { static_cast<DWORD>(EXCEPTION_ACCESS_VIOLATION), "SIGSEGV - Segmentation violation signal" },
- { static_cast<DWORD>(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error" },
+ { EXCEPTION_ILLEGAL_INSTRUCTION, "SIGILL - Illegal instruction signal" },
+ { EXCEPTION_STACK_OVERFLOW, "SIGSEGV - Stack overflow" },
+ { EXCEPTION_ACCESS_VIOLATION, "SIGSEGV - Segmentation violation signal" },
+ { EXCEPTION_INT_DIVIDE_BY_ZERO, "Divide by zero error" },
};
static LONG CALLBACK topLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo) {
@@ -125,7 +125,7 @@ namespace Catch {
}
void FatalConditionHandler::disengage_platform() {
- if (SetUnhandledExceptionFilter(reinterpret_cast<LPTOP_LEVEL_EXCEPTION_FILTER>(previousTopLevelExceptionFilter)) != topLevelExceptionFilter) {
+ if (SetUnhandledExceptionFilter(previousTopLevelExceptionFilter) != topLevelExceptionFilter) {
CATCH_RUNTIME_ERROR("Could not restore previous top level exception filter");
}
previousTopLevelExceptionFilter = nullptr;