mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-13 20:47:24 +00:00
Tidying
This commit is contained in:
parent
74ed7b4165
commit
7ed0ec2975
1 changed files with 2 additions and 12 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue