mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 13:08:04 +02:00
util: add bitmask_size() to return the size of a bitmask
This way we can theoretically change the bitmask to use a longer type in the future. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1271>
This commit is contained in:
parent
8336721dc0
commit
4c4d5f33ee
1 changed files with 6 additions and 0 deletions
|
|
@ -106,6 +106,12 @@ typedef struct {
|
||||||
uint32_t mask;
|
uint32_t mask;
|
||||||
} bitmask_t;
|
} bitmask_t;
|
||||||
|
|
||||||
|
static inline size_t
|
||||||
|
bitmask_size(void)
|
||||||
|
{
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
bitmask_as_u32(bitmask_t mask)
|
bitmask_as_u32(bitmask_t mask)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue