mirror of
https://github.com/recp/cglm.git
synced 2026-01-06 15:10:04 +00:00
Merge pull request #279 from NeRdTheNed/master
Check for builtin before using it
This commit is contained in:
@@ -32,9 +32,13 @@
|
|||||||
# define CGLM_ALIGN_MAT CGLM_ALIGN(16)
|
# define CGLM_ALIGN_MAT CGLM_ALIGN(16)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(__has_builtin)
|
||||||
# define CGLM_ASSUME_ALIGNED(expr, alignment) \
|
# if __has_builtin(__builtin_assume_aligned)
|
||||||
__builtin_assume_aligned((expr), (alignment))
|
# define CGLM_ASSUME_ALIGNED(expr, alignment) \
|
||||||
|
__builtin_assume_aligned((expr), (alignment))
|
||||||
|
# else
|
||||||
|
# define CGLM_ASSUME_ALIGNED(expr, alignment) (expr)
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define CGLM_ASSUME_ALIGNED(expr, alignment) (expr)
|
# define CGLM_ASSUME_ALIGNED(expr, alignment) (expr)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user