mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-20 13:18:03 +00:00
more fixes to bad macros
This commit is contained in:
parent
a790e21d4e
commit
f1d1079faf
16
clay.h
16
clay.h
@ -112,6 +112,14 @@ static int CLAY__ELEMENT_DEFINITION_LATCH = 0;
|
||||
children \
|
||||
Clay__CloseElementWithChildren()
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define CLAY__ALIGNMENT(type) alignof(type)
|
||||
#define CLAY__INIT(type) type
|
||||
#else
|
||||
#define CLAY__INIT(type) (type)
|
||||
#define CLAY__ALIGNMENT(type) (offsetof(struct { char c; type x; }, x))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -452,14 +460,6 @@ extern uint32_t Clay__debugViewWidth;
|
||||
#define CLAY__MAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
#define CLAY__MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define CLAY__ALIGNMENT(type) alignof(type)
|
||||
#define CLAY__INIT(type) type
|
||||
#else
|
||||
#define CLAY__INIT(type) (type)
|
||||
#define CLAY__ALIGNMENT(type) (offsetof(struct { char c; type x; }, x))
|
||||
#endif
|
||||
|
||||
bool Clay__warningsEnabled = true;
|
||||
|
||||
Clay_String CLAY__SPACECHAR = CLAY__INIT(Clay_String) { .length = 1, .chars = " " };
|
||||
|
Loading…
Reference in New Issue
Block a user