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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
This commit is contained in:
Carlos Garnacho 2021-10-24 19:16:42 +02:00
parent 820aa18126
commit 70a5f29ef1

View File

@ -227,6 +227,7 @@ static gboolean
state_is_applicable (MetaSequenceState prev_state, state_is_applicable (MetaSequenceState prev_state,
MetaSequenceState state) MetaSequenceState state)
{ {
/* PENDING_END state is final */
if (prev_state == META_SEQUENCE_PENDING_END) if (prev_state == META_SEQUENCE_PENDING_END)
return FALSE; return FALSE;
@ -234,10 +235,6 @@ state_is_applicable (MetaSequenceState prev_state,
if (state == META_SEQUENCE_NONE) if (state == META_SEQUENCE_NONE)
return FALSE; return FALSE;
/* PENDING_END state is final */
if (prev_state == META_SEQUENCE_PENDING_END)
return FALSE;
/* Sequences must be accepted/denied before PENDING_END */ /* Sequences must be accepted/denied before PENDING_END */
if (prev_state == META_SEQUENCE_NONE && if (prev_state == META_SEQUENCE_NONE &&
state == META_SEQUENCE_PENDING_END) state == META_SEQUENCE_PENDING_END)