Commit 2dcce6d5 authored by Steven Noonan's avatar Steven Noonan

introduce MA_RESTRICT macro

This allows us to use the __restrict keyword in places where we know
that pointers do not alias.
Signed-off-by: default avatarSteven Noonan <steven@uplinklabs.net>
parent 5472d841
...@@ -6752,6 +6752,14 @@ static MA_INLINE ma_bool32 ma_has_neon(void) ...@@ -6752,6 +6752,14 @@ static MA_INLINE ma_bool32 ma_has_neon(void)
#endif #endif
#endif #endif
#ifndef MA_RESTRICT
#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER)
#define MA_RESTRICT __restrict
#else
#define MA_RESTRICT
#endif
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1400 #if defined(_MSC_VER) && _MSC_VER >= 1400
#define MA_HAS_BYTESWAP16_INTRINSIC #define MA_HAS_BYTESWAP16_INTRINSIC
#define MA_HAS_BYTESWAP32_INTRINSIC #define MA_HAS_BYTESWAP32_INTRINSIC
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment