diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2020-08-21 18:59:51 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2020-08-23 13:57:05 -0700 |
| commit | fcc8dfd1897cfe303dae631d9de6ab6804a2e328 (patch) | |
| tree | 9354a2d9dc94cf58ff4c9fd539a54a970d079d1f /Source/Core/Common | |
| parent | 89b6a4cbeedfeece3378b8f1907af6b1e2072061 (diff) | |
Common/Assert: no longer needs special impl for msvc
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Assert.h | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/Source/Core/Common/Assert.h b/Source/Core/Common/Assert.h index afe4ead4ee..24d8b73202 100644 --- a/Source/Core/Common/Assert.h +++ b/Source/Core/Common/Assert.h @@ -9,28 +9,6 @@ #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" -#ifdef _WIN32 -#define ASSERT_MSG(_t_, _a_, _fmt_, ...) \ - do \ - { \ - if (!(_a_)) \ - { \ - if (!PanicYesNo(_fmt_, __VA_ARGS__)) \ - Crash(); \ - } \ - } while (0) - -#define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \ - do \ - { \ - if (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG && !(_a_)) \ - { \ - ERROR_LOG(_t_, _msg_, __VA_ARGS__); \ - if (!PanicYesNo(_msg_, __VA_ARGS__)) \ - Crash(); \ - } \ - } while (0) -#else #define ASSERT_MSG(_t_, _a_, _fmt_, ...) \ do \ { \ @@ -44,14 +22,16 @@ #define DEBUG_ASSERT_MSG(_t_, _a_, _msg_, ...) \ do \ { \ - if (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG && !(_a_)) \ + if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \ { \ - ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \ - if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \ - Crash(); \ + if (!(_a_)) \ + { \ + ERROR_LOG(_t_, _msg_, ##__VA_ARGS__); \ + if (!PanicYesNo(_msg_, ##__VA_ARGS__)) \ + Crash(); \ + } \ } \ } while (0) -#endif #define ASSERT(_a_) \ do \ @@ -64,6 +44,6 @@ #define DEBUG_ASSERT(_a_) \ do \ { \ - if (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \ + if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG) \ ASSERT(_a_); \ } while (0) |
