From aa3559cb4ed5d2d65ae281064928c31e721a89d2 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 25 Jul 2018 13:26:38 -0400 Subject: [PATCH] perf: Massive optimization for enum utils --- ICD.Common.Utils/EnumUtils.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ICD.Common.Utils/EnumUtils.cs b/ICD.Common.Utils/EnumUtils.cs index ee3bdc2..20eeb92 100644 --- a/ICD.Common.Utils/EnumUtils.cs +++ b/ICD.Common.Utils/EnumUtils.cs @@ -35,11 +35,12 @@ namespace ICD.Common.Utils if (type == null) throw new ArgumentNullException("type"); - return type.IsAssignableTo(typeof(Enum)) || type + // Type + return type #if !SIMPLSHARP - .GetTypeInfo() + .GetTypeInfo() #endif - .IsEnum; + .IsEnum; } ///