From 80e6fe33c7dc76495d55c40f64fda87cb4aaadef Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 26 Jul 2018 11:48:22 -0400 Subject: [PATCH] perf: Massive optimization to enum utils --- ICD.Common.Utils/EnumUtils.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ICD.Common.Utils/EnumUtils.cs b/ICD.Common.Utils/EnumUtils.cs index b0a7d70..24dc0ac 100644 --- a/ICD.Common.Utils/EnumUtils.cs +++ b/ICD.Common.Utils/EnumUtils.cs @@ -35,11 +35,11 @@ namespace ICD.Common.Utils if (type == null) throw new ArgumentNullException("type"); - return type.IsAssignableTo(typeof(Enum)) || type + return type #if !SIMPLSHARP - .GetTypeInfo() + .GetTypeInfo() #endif - .IsEnum; + .IsEnum || type.IsAssignableTo(typeof(Enum)); } ///