mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 08:00:09 +01:00
Invert an if condition
Go from:
if (a != b)
continue;
foo;
to:
if (a == b) {
foo;
}
Basically just an indentation change after the condition inversion, makes the
follow-up patch easier to review.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
507bd1ee28
commit
2056da9517
1 changed files with 6 additions and 7 deletions
|
|
@ -740,15 +740,14 @@ terminate_slots(struct libevdev *dev,
|
|||
bool touches_stopped = false;
|
||||
|
||||
for (int slot = 0; slot < dev->num_slots; slot++) {
|
||||
if (changes[slot].state != TOUCH_CHANGED)
|
||||
continue;
|
||||
|
||||
if (changes[slot].state == TOUCH_CHANGED) {
|
||||
queue_push_event(dev, EV_ABS, ABS_MT_SLOT, slot);
|
||||
queue_push_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
|
||||
|
||||
*last_reported_slot = slot;
|
||||
touches_stopped = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* If any of the touches stopped, we need to split the sync state
|
||||
into two frames - one with all the stopped touches, one with the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue