Skip to content

Commit

Permalink
Revert "go back to the v0.6.3 solution for VS2015 static_assert worka…
Browse files Browse the repository at this point in the history
…round"

I tested this on MSVC 2015 and it does NOT works, it fails with the same way as direct use of static_assert(). So, I reverting this back.

This reverts commits
3c1c825
aee74cb
  • Loading branch information
Wohlstand committed Sep 10, 2024
1 parent e429a1e commit cb2c1cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gme/blargg_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
#define STATIC_CAST(T,expr) ((T) (expr))
#endif

#if defined(_MSC_VER) && _MSC_VER < 1910
#define blaarg_static_assert(cond, msg) \
void blargg_failed_(int (*arg) [2 / static_cast<int>(static_cast<bool>(cond)) - 1])
#else
#if !defined(_MSC_VER) || _MSC_VER >= 1910
#define blaarg_static_assert(cond, msg) static_assert(cond, msg)
#else
#define blaarg_static_assert(cond, msg) assert(cond)
#endif

// blargg_err_t (0 on success, otherwise error string)
Expand Down

0 comments on commit cb2c1cc

Please sign in to comment.