mirror of
https://github.com/libsdl-org/SDL
synced 2024-11-20 16:06:10 -07:00
Add 'wl_list_for_each_safe' to the clang-format macro list
...and fix the formatting when it is used.
This commit is contained in:
parent
3875ef4552
commit
717f297849
4 changed files with 4 additions and 6 deletions
|
@ -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",
|
||||
]
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue