fix: Fixed EnumUtils.GetValuesExceptNone to work for non-flag enums

This commit is contained in:
Drew Tingen
2021-09-28 09:32:07 -04:00
committed by Chris Cameron
parent d00d2febf3
commit c08a6283b8
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,8 @@ namespace ICD.Common.Utils.Tests
A = 1, A = 1,
B = 2, B = 2,
C = 4, C = 4,
D = 32 D = 32,
BandC = B | C
} }
[Test] [Test]

View File

@@ -198,7 +198,7 @@ namespace ICD.Common.Utils
if (type == null) if (type == null)
throw new ArgumentNullException("type"); throw new ArgumentNullException("type");
return GetFlagsExceptNone(type); return GetValues(type).Where(v => (int)v != 0);
} }
/// <summary> /// <summary>