Use Except where possible

This commit is contained in:
YoshiRulz 2019-03-27 14:19:11 +10:00
parent ac1b24ae6c
commit 6abcf7953c
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 2 additions and 8 deletions

View File

@ -194,13 +194,7 @@ namespace BizHawk.Client.Common
/// <param name="watches"><see cref="IEnumerable{Watch}"/> of watch to merge</param>
public void AddRange(IEnumerable<Watch> watches)
{
Parallel.ForEach(watches, watch =>
{
if (!_watchList.Contains(watch))
{
_watchList.Add(watch);
}
});
_watchList.AddRange(watches.Except(_watchList));
Changes = true;
}

View File

@ -213,7 +213,7 @@ namespace BizHawk.Client.EmuHawk
SetDomain(domain);
SetHighlighted(addrList[0]);
_secondaryHighlightedAddresses.Clear();
_secondaryHighlightedAddresses.AddRange(addrList.Where(addr => addr != addrList[0]));
_secondaryHighlightedAddresses.AddRange(addrList.Except(new List<long> { addrList[0] }));
ClearNibbles();
UpdateValues();
MemoryViewerBox.Refresh();