Merge remote-tracking branch 'origin/fixcastissue' into dev

This commit is contained in:
Chris Cameron
2018-04-16 10:31:37 -04:00

View File

@@ -321,7 +321,7 @@ namespace ICD.Common.Utils
throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value");
int maxEnumValue = (GetValues<T>().Max(v => (int)(object)v) * 2) -1 ;
return Enumerable.Range(1, maxEnumValue).Cast<T>().Where(v => HasFlags(value, v));
return Enumerable.Range(1, maxEnumValue).Select(i => (T)(object)i ).Where(v => HasFlags(value, v));
}
/// <summary>