Adds in assume checking for debug builds

This commit is contained in:
2024-08-16 23:19:41 -04:00
parent 866edb5273
commit 5f4e7a0279

View File

@@ -22,7 +22,13 @@
#define FGL_FORCE_INLINE [[gnu::always_inline]]
#define FGL_FORCE_INLINE_FLATTEN FGL_FLATTEN FGL_FORCE_INLINE
#ifndef NDEBUG
#define FGL_ASSUME( ... ) \
FGL_ASSERT( !( __VA_ARGS__ ) ); \
[[gnu::assume( __VA_ARGS__ )]]
#else
#define FGL_ASSUME( ... ) [[gnu::assume( __VA_ARGS__ )]]
#endif
#define FGL_ALIGN( bytesize ) [[gnu::alligned( bitsize )]]