mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-17 05:35:07 +00:00
Tidying
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user