From ddb7f842911a3a9d7296cecb2bba7638c264c9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 17 Jun 2022 16:29:34 +0200 Subject: [PATCH] wayland/surface: Simplify is_child & is_sibling Part-of: --- src/wayland/meta-wayland-subsurface.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index ef6f6657b..4055e6882 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -95,20 +95,14 @@ static gboolean is_child (MetaWaylandSurface *surface, MetaWaylandSurface *sibling) { - if (surface->sub.parent == sibling) - return TRUE; - else - return FALSE; + return surface->sub.parent == sibling; } static gboolean is_sibling (MetaWaylandSurface *surface, MetaWaylandSurface *sibling) { - if (surface->sub.parent == sibling->sub.parent) - return TRUE; - else - return FALSE; + return surface->sub.parent == sibling->sub.parent; } static gboolean