diff --git a/source/mijin/debug/assert.hpp b/source/mijin/debug/assert.hpp index 6dfcf56..336cf6c 100644 --- a/source/mijin/debug/assert.hpp +++ b/source/mijin/debug/assert.hpp @@ -8,18 +8,16 @@ #include #include -#if MIJIN_DEBUG #ifdef _WIN32 #pragma comment(lib, "kernel32") extern "C" __declspec(dllimport) void __stdcall DebugBreak(); #define MIJIN_TRAP() DebugBreak() #define MIJIN_FUNC() __FUNCSIG__ #else // _WIN32 -#include -#define MIJIN_TRAP() raise(SIGTRAP) +#include +#define MIJIN_TRAP() (void) std::raise(SIGTRAP) #define MIJIN_FUNC() "" // TODO: __PRETTY_FUNCTION__ is not working for some reason -.- #endif // !_WIN32 -#endif // MIJIN_DEBUG namespace mijin { diff --git a/source/mijin/util/os.hpp b/source/mijin/util/os.hpp index 9104b0f..ec936c7 100644 --- a/source/mijin/util/os.hpp +++ b/source/mijin/util/os.hpp @@ -44,16 +44,4 @@ void setCurrentThreadName(const char* threadName) noexcept; } // namespace mijin -#if MIJIN_TARGET_OS == MIJIN_OS_LINUX || MIJIN_TARGET_OS == MIJIN_OS_OSX -#if !defined(SIGTRAP) -static constexpr int SIGTRAP = 5; -#endif -#define _debugBreak() (void) std::raise(SIGTRAP) -#elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS -extern "C" __declspec(dllimport) void __stdcall DebugBreak(); -#define _debugBreak() DebugBreak() -#else -#define _debugBreak() ((void)0) -#endif - #endif // !defined(MIJIN_UTIL_OS_HPP_INCLUDED)