This commit is contained in:
Chris Cameron
2018-03-13 14:28:16 -04:00
parent 74ed7b4165
commit 7ed0ec2975

View File

@@ -263,20 +263,10 @@ namespace ICD.Common.Utils.Extensions
Dictionary<T, int> count = new Dictionary<T, int>(comparer);
foreach (T item in extends)
{
if (count.ContainsKey(item))
count[item]++;
else
count.Add(item, 1);
}
count[item] = count.GetDefault(item, 0) + 1;
foreach (T item in other)
{
if (count.ContainsKey(item))
count[item]--;
else
return false;
}
count[item] = count.GetDefault(item, 0) - 1;
return count.Values.All(c => c == 0);
}