Refactor the using of bool type
This commit is contained in:
@@ -31,8 +31,8 @@
|
||||
# define nullptr ((void*)0)
|
||||
#endif
|
||||
|
||||
#define true ((_Bool)1)
|
||||
#define false ((_Bool)0)
|
||||
#define true ((bool)1)
|
||||
#define false ((bool)0)
|
||||
|
||||
#define abs(v) _Generic((v), ldbl_t: fabsl, dbl_t: fabs, fl_t: fabsf)(v)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define is_permissible(T) (sizeof(void*) >= sizeof(T) && _Alignof(void*) >= _Alignof(T))
|
||||
|
||||
typedef union {
|
||||
void* ptr; _Bool b;
|
||||
void* ptr; bool b;
|
||||
str_t s; arr_t a; list_t l;
|
||||
map_t m; set_t vs;
|
||||
u8_t u8; u16_t u16; u32_t u32; u64_t u64;
|
||||
|
||||
Reference in New Issue
Block a user