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); Dictionary<T, int> count = new Dictionary<T, int>(comparer);
foreach (T item in extends) foreach (T item in extends)
{ count[item] = count.GetDefault(item, 0) + 1;
if (count.ContainsKey(item))
count[item]++;
else
count.Add(item, 1);
}
foreach (T item in other) foreach (T item in other)
{ count[item] = count.GetDefault(item, 0) - 1;
if (count.ContainsKey(item))
count[item]--;
else
return false;
}
return count.Values.All(c => c == 0); return count.Values.All(c => c == 0);
} }