Clang-Tidy fixes (#6725)

This commit is contained in:
Pierre Wendling 2022-12-01 16:07:03 -05:00 committed by GitHub
parent c2ce44bead
commit 3c501b963d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
184 changed files with 1312 additions and 1154 deletions

View file

@ -125,8 +125,7 @@ static int SDL_EVDEV_device_removed(const char *dev_path);
static int SDL_EVDEV_device_added(const char *dev_path, int udev_class);
#if SDL_USE_LIBUDEV
static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_class,
const char *dev_path);
static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class, const char *dev_path);
#endif /* SDL_USE_LIBUDEV */
static Uint8 EVDEV_MouseButtons[] = {
@ -316,10 +315,11 @@ void SDL_EVDEV_Poll(void)
next finger after earlist is released) */
if (item->is_touchscreen && events[i].code == BTN_TOUCH) {
if (item->touchscreen_data->max_slots == 1) {
if (events[i].value)
if (events[i].value) {
item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_DOWN;
else
} else {
item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_UP;
}
}
break;
}
@ -817,8 +817,8 @@ static int SDL_EVDEV_device_added(const char *dev_path, int udev_class)
/* For now, we just treat a touchpad like a touchscreen */
if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) {
item->is_touchscreen = SDL_TRUE;
if ((ret = SDL_EVDEV_init_touchscreen(item, udev_class)) < 0) {
ret = SDL_EVDEV_init_touchscreen(item, udev_class);
if (ret < 0) {
close(item->fd);
SDL_free(item->path);
SDL_free(item);