mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user