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: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
Steven Noonan
2021-03-13 19:09:55 -08:00
parent 5472d84180
commit 2dcce6d53b
+8
View File
@@ -6752,6 +6752,14 @@ static MA_INLINE ma_bool32 ma_has_neon(void)
#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
#define MA_HAS_BYTESWAP16_INTRINSIC
#define MA_HAS_BYTESWAP32_INTRINSIC