mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Let's not duplicate those macros more than needed
This commit is contained in:
parent
3ccce249ea
commit
0691c9e0d3
@ -78,14 +78,17 @@
|
||||
#define BIT64_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT128_SET(a, bit) ((a).data[(bit) >> 5] |= (1 << ((bit) & 31)))
|
||||
#define BIT128_SET_PTR(a, bit) ((a)->data[(bit) >> 5] |= (1 << ((bit) & 31)))
|
||||
#define BIT128_CLEAR(a, bit) ((a).data[(bit) >> 5] &= ~(1 << ((bit) & 31)))
|
||||
#define BIT128_GET(a, bit) (((a).data[(bit) >> 5] >> ((bit) & 31)) & 1)
|
||||
#define BIT128_GET_PTR(a, bit) (((a)->data[(bit) >> 5] >> ((bit) & 31)) & 1)
|
||||
#define BIT128_CLEAR_ALL(a) memset(&(a), 0, sizeof(a))
|
||||
#define BIT128_CLEAR_ALL_PTR(a) memset((a), 0, sizeof(retro_bits_t))
|
||||
|
||||
#define BIT128_SET_PTR(a, bit) BIT128_SET(*a, bit)
|
||||
#define BIT128_CLEAR_PTR(a, bit) BIT128_CLEAR(*a, bit)
|
||||
#define BIT128_GET_PTR(a, bit) BIT128_GET(*a, bit)
|
||||
#define BIT128_CLEAR_ALL_PTR(a) BIT128_CLEAR_ALL(*a)
|
||||
|
||||
/* Helper macros and struct to keep track of many booleans. */
|
||||
/* This struct has 256 bits, but the macros are named 128 due to some historical accident. */
|
||||
typedef struct
|
||||
{
|
||||
uint32_t data[8];
|
||||
|
Loading…
x
Reference in New Issue
Block a user