mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-15 10:48:04 +00:00
make min and max type safe
This commit is contained in:
parent
5571c00a21
commit
2b31cffd9f
4
clay.h
4
clay.h
@ -50,8 +50,8 @@
|
||||
|
||||
// Public Macro API ------------------------
|
||||
|
||||
#define CLAY__MAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
#define CLAY__MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#define CLAY__MAX(x, y) (__typeof__ (x) _x = (x); __typeof__ (y) _y = (y); ((_x) > (_y)) ? (_x) : (_y))
|
||||
#define CLAY__MIN(x, y) (__typeof__ (x) _x = (x); __typeof__ (y) _y = (y); ((_x) < (_y)) ? (_x) : (_y))
|
||||
|
||||
#define CLAY_TEXT_CONFIG(...) Clay__StoreTextElementConfig(CLAY__CONFIG_WRAPPER(Clay_TextElementConfig, __VA_ARGS__))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user