mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d: Introduce a softer form of assertion.
Triggering an ERR() instead of aborting the program.
This commit is contained in:
committed by
Henri Verbeet
parent
a484063cd2
commit
d7fc2693c4
Notes:
Henri Verbeet
2024-07-29 13:23:46 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/867
@ -46,6 +46,12 @@
|
||||
|
||||
#define STATIC_ASSERT(e) extern void __VKD3D_STATIC_ASSERT__(int [(e) ? 1 : -1])
|
||||
|
||||
#define VKD3D_ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) \
|
||||
ERR("Failed assertion: %s\n", #cond); \
|
||||
} while (0)
|
||||
|
||||
#define MEMBER_SIZE(t, m) sizeof(((t *)0)->m)
|
||||
|
||||
#define VKD3D_MAKE_TAG(ch0, ch1, ch2, ch3) \
|
||||
|
Reference in New Issue
Block a user