From 70a5f29ef1fe81ec76eb47d00d806350e5c2d742 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sun, 24 Oct 2021 19:16:42 +0200 Subject: [PATCH] core: Drop repeated early return condition in function We are already checking for prev_state == META_SEQUENCE_PENDING_END, no need to do it twice. CID: #1418251 Part-of: --- src/core/meta-gesture-tracker.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/meta-gesture-tracker.c b/src/core/meta-gesture-tracker.c index 2badf8b82..33ee834e3 100644 --- a/src/core/meta-gesture-tracker.c +++ b/src/core/meta-gesture-tracker.c @@ -227,6 +227,7 @@ static gboolean state_is_applicable (MetaSequenceState prev_state, MetaSequenceState state) { + /* PENDING_END state is final */ if (prev_state == META_SEQUENCE_PENDING_END) return FALSE; @@ -234,10 +235,6 @@ state_is_applicable (MetaSequenceState prev_state, if (state == META_SEQUENCE_NONE) return FALSE; - /* PENDING_END state is final */ - if (prev_state == META_SEQUENCE_PENDING_END) - return FALSE; - /* Sequences must be accepted/denied before PENDING_END */ if (prev_state == META_SEQUENCE_NONE && state == META_SEQUENCE_PENDING_END)