From 1347d0bb1e75184692bfdc7ab62c35d8dc3990b2 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 5 Jun 2020 23:56:53 +0200 Subject: [PATCH] use HasFlag in InputHandler for better readability --- MLEM/Input/InputHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM/Input/InputHandler.cs b/MLEM/Input/InputHandler.cs index 4cd8910..36740b5 100644 --- a/MLEM/Input/InputHandler.cs +++ b/MLEM/Input/InputHandler.cs @@ -416,7 +416,7 @@ namespace MLEM.Input { /// True if a gesture of the type was found, otherwise false public bool GetGesture(GestureType type, out GestureSample sample) { foreach (var gesture in this.Gestures) { - if ((gesture.GestureType & type) != 0) { + if (type.HasFlag(gesture.GestureType)) { sample = gesture; return true; }