mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 07:18:08 +02:00
tablet: split a ternary condition into a normal if else for readability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e8860fcf55
commit
06e7adfca3
1 changed files with 4 additions and 2 deletions
|
|
@ -1194,8 +1194,10 @@ tablet_notify_button_mask(struct tablet_dispatch *tablet,
|
||||||
size_t nbits = 8 * sizeof(buttons->bits);
|
size_t nbits = 8 * sizeof(buttons->bits);
|
||||||
enum libinput_tablet_tool_tip_state tip_state;
|
enum libinput_tablet_tool_tip_state tip_state;
|
||||||
|
|
||||||
tip_state = tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT) ?
|
if (tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT))
|
||||||
LIBINPUT_TABLET_TOOL_TIP_DOWN : LIBINPUT_TABLET_TOOL_TIP_UP;
|
tip_state = LIBINPUT_TABLET_TOOL_TIP_DOWN;
|
||||||
|
else
|
||||||
|
tip_state = LIBINPUT_TABLET_TOOL_TIP_UP;
|
||||||
|
|
||||||
for (i = 0; i < nbits; i++) {
|
for (i = 0; i < nbits; i++) {
|
||||||
if (!bit_is_set(buttons->bits, i))
|
if (!bit_is_set(buttons->bits, i))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue