mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-17 09:44:08 +00:00
defined out asserts.
This commit is contained in:
parent
d9a3533438
commit
af6e132b37
48 changed files with 156 additions and 6 deletions
|
@ -226,7 +226,11 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
|||
#define _TODO(x)
|
||||
#define _TODOCONST(x) (x)
|
||||
|
||||
#ifdef CHECK_STRUCT_SIZES
|
||||
#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
|
||||
#else
|
||||
#define VALIDATE_SIZE(struc, size)
|
||||
#endif
|
||||
#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
|
||||
|
||||
#define PERCENT(x, p) ((float(x) * (float(p) / 100.0f)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue