mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-11 18:54:55 +00:00
perf: Reducing boxing
This commit is contained in:
@@ -458,7 +458,9 @@ namespace ICD.Common.Utils
|
||||
if (!IsEnum(value))
|
||||
throw new ArgumentException(string.Format("{0} is not an enum", value.GetType().Name), "value");
|
||||
|
||||
return HasAnyFlags(value) && !HasMultipleFlags(value);
|
||||
int numeric = (int)(object)value;
|
||||
|
||||
return HasAnyFlags(numeric) && !HasMultipleFlags(numeric);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user