perf: Massive optimization to enum utils

This commit is contained in:
Chris Cameron
2018-07-26 11:48:22 -04:00
parent 220e778a76
commit 80e6fe33c7

View File

@@ -35,11 +35,11 @@ namespace ICD.Common.Utils
if (type == null) if (type == null)
throw new ArgumentNullException("type"); throw new ArgumentNullException("type");
return type.IsAssignableTo(typeof(Enum)) || type return type
#if !SIMPLSHARP #if !SIMPLSHARP
.GetTypeInfo() .GetTypeInfo()
#endif #endif
.IsEnum; .IsEnum || type.IsAssignableTo(typeof(Enum));
} }
/// <summary> /// <summary>