summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-02-24 23:15:22 -0600
committerDudemanguy <random342@airmail.cc>2024-02-27 22:18:12 +0000
commit661f45377a17635125ae36f0b8a3487ae13cf606 (patch)
tree5529adc352f84a7b3f244daf23bf380567d65b24 /video/out/wayland_common.c
parentf0a6578259f508a8863afcf9a1487872d7ae1878 (diff)
downloadmpv-661f45377a17635125ae36f0b8a3487ae13cf606.tar.bz2
mpv-661f45377a17635125ae36f0b8a3487ae13cf606.tar.xz
wayland: drop some unneeded curly braces (no-op)
Not sure why all of these single line if's were being braced. Probably some cargo cult from years ago but might as well fix it now since it's bothering me.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r--video/out/wayland_common.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index d551686424..cd37c56e83 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1431,9 +1431,8 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
wl_surface_add_listener(wl->surface, &surface_listener, wl);
}
- if (!strcmp(interface, wl_subcompositor_interface.name) && (ver >= 1) && found++) {
+ if (!strcmp(interface, wl_subcompositor_interface.name) && (ver >= 1) && found++)
wl->subcompositor = wl_registry_bind(reg, id, &wl_subcompositor_interface, 1);
- }
if (!strcmp (interface, zwp_linux_dmabuf_v1_interface.name) && (ver >= 4) && found++) {
wl->dmabuf = wl_registry_bind(reg, id, &zwp_linux_dmabuf_v1_interface, 4);
@@ -1441,13 +1440,11 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
zwp_linux_dmabuf_feedback_v1_add_listener(wl->dmabuf_feedback, &dmabuf_feedback_listener, wl);
}
- if (!strcmp (interface, wp_viewporter_interface.name) && (ver >= 1) && found++) {
+ if (!strcmp (interface, wp_viewporter_interface.name) && (ver >= 1) && found++)
wl->viewporter = wl_registry_bind (reg, id, &wp_viewporter_interface, 1);
- }
- if (!strcmp(interface, wl_data_device_manager_interface.name) && (ver >= 3) && found++) {
+ if (!strcmp(interface, wl_data_device_manager_interface.name) && (ver >= 3) && found++)
wl->dnd_devman = wl_registry_bind(reg, id, &wl_data_device_manager_interface, 3);
- }
if (!strcmp(interface, wl_output_interface.name) && (ver >= 2) && found++) {
struct vo_wayland_output *output = talloc_zero(wl, struct vo_wayland_output);
@@ -1484,30 +1481,25 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
wl_list_insert(&wl->seat_list, &seat->link);
}
- if (!strcmp(interface, wl_shm_interface.name) && found++) {
+ if (!strcmp(interface, wl_shm_interface.name) && found++)
wl->shm = wl_registry_bind(reg, id, &wl_shm_interface, 1);
- }
#if HAVE_WAYLAND_PROTOCOLS_1_27
- if (!strcmp(interface, wp_content_type_manager_v1_interface.name) && found++) {
+ if (!strcmp(interface, wp_content_type_manager_v1_interface.name) && found++)
wl->content_type_manager = wl_registry_bind(reg, id, &wp_content_type_manager_v1_interface, 1);
- }
- if (!strcmp(interface, wp_single_pixel_buffer_manager_v1_interface.name) && found++) {
+ if (!strcmp(interface, wp_single_pixel_buffer_manager_v1_interface.name) && found++)
wl->single_pixel_manager = wl_registry_bind(reg, id, &wp_single_pixel_buffer_manager_v1_interface, 1);
- }
#endif
#if HAVE_WAYLAND_PROTOCOLS_1_31
- if (!strcmp(interface, wp_fractional_scale_manager_v1_interface.name) && found++) {
+ if (!strcmp(interface, wp_fractional_scale_manager_v1_interface.name) && found++)
wl->fractional_scale_manager = wl_registry_bind(reg, id, &wp_fractional_scale_manager_v1_interface, 1);
- }
#endif
#if HAVE_WAYLAND_PROTOCOLS_1_32
- if (!strcmp(interface, wp_cursor_shape_manager_v1_interface.name) && found++) {
+ if (!strcmp(interface, wp_cursor_shape_manager_v1_interface.name) && found++)
wl->cursor_shape_manager = wl_registry_bind(reg, id, &wp_cursor_shape_manager_v1_interface, 1);
- }
#endif
if (!strcmp(interface, wp_presentation_interface.name) && found++) {
@@ -1521,13 +1513,11 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
xdg_wm_base_add_listener(wl->wm_base, &xdg_wm_base_listener, wl);
}
- if (!strcmp(interface, zxdg_decoration_manager_v1_interface.name) && found++) {
+ if (!strcmp(interface, zxdg_decoration_manager_v1_interface.name) && found++)
wl->xdg_decoration_manager = wl_registry_bind(reg, id, &zxdg_decoration_manager_v1_interface, 1);
- }
- if (!strcmp(interface, zwp_idle_inhibit_manager_v1_interface.name) && found++) {
+ if (!strcmp(interface, zwp_idle_inhibit_manager_v1_interface.name) && found++)
wl->idle_inhibit_manager = wl_registry_bind(reg, id, &zwp_idle_inhibit_manager_v1_interface, 1);
- }
if (found > 1)
MP_VERBOSE(wl, "Registered for protocol %s\n", interface);