diff options
author | David Robillard <d@drobilla.net> | 2022-07-07 10:34:52 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-17 17:32:02 -0400 |
commit | d06e4107e82fd7e1337068b94c451e2f29f4e76c (patch) | |
tree | a7c8881b9d6986f4c05eb2679a8d91be49a60df5 /src | |
parent | c6f05ca4a012642012235e67da166f9833f6c56b (diff) | |
download | sord-d06e4107e82fd7e1337068b94c451e2f29f4e76c.tar.gz sord-d06e4107e82fd7e1337068b94c451e2f29f4e76c.tar.bz2 sord-d06e4107e82fd7e1337068b94c451e2f29f4e76c.zip |
Implement SORD_UNREACHABLE() for MSVC
Diffstat (limited to 'src')
-rw-r--r-- | src/sord_internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sord_internal.h b/src/sord_internal.h index 4aef846..ef22467 100644 --- a/src/sord_internal.h +++ b/src/sord_internal.h @@ -24,9 +24,10 @@ #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 4) # define SORD_UNREACHABLE() __builtin_unreachable() +#elif defined(_MSC_VER) +# define SORD_UNREACHABLE() __assume(0) #else -# include <assert.h> -# define SORD_UNREACHABLE() assert(0) +# define SORD_UNREACHABLE() #endif /** Resource node metadata */ |