diff --git a/.clang-format b/.clang-format index e98e5cd70..4e932d022 100644 --- a/.clang-format +++ b/.clang-format @@ -82,6 +82,7 @@ ForEachMacros: "spa_list_for_each", "spa_list_for_each_safe", "wl_list_for_each", + "wl_list_for_each_safe", "wl_array_for_each", "udev_list_entry_foreach", ] diff --git a/src/video/wayland/SDL_waylanddatamanager.c b/src/video/wayland/SDL_waylanddatamanager.c index eea8c3200..0fab6fe21 100644 --- a/src/video/wayland/SDL_waylanddatamanager.c +++ b/src/video/wayland/SDL_waylanddatamanager.c @@ -200,8 +200,7 @@ static void mime_data_list_free(struct wl_list *list) SDL_MimeDataList *mime_data = NULL; SDL_MimeDataList *next = NULL; - wl_list_for_each_safe(mime_data, next, list, link) - { + wl_list_for_each_safe (mime_data, next, list, link) { if (mime_data->data) { SDL_free(mime_data->data); } diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index f55c4eb5a..00f10a756 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -3107,8 +3107,7 @@ void Wayland_display_destroy_input(SDL_VideoData *d) wl_touch_destroy(input->touch); } - wl_list_for_each_safe(tp, tmp, &touch_points, link) - { + wl_list_for_each_safe (tp, tmp, &touch_points, link) { WAYLAND_wl_list_remove(&tp->link); SDL_free(tp); } diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index 8a3015832..2054471eb 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -201,8 +201,7 @@ error: static void Wayland_FlushOutputOrder(SDL_VideoData *vid) { SDL_WaylandConnectorName *c, *tmp; - wl_list_for_each_safe(c, tmp, &vid->output_order, link) - { + wl_list_for_each_safe (c, tmp, &vid->output_order, link) { WAYLAND_wl_list_remove(&c->link); SDL_free(c); }