Replace some Where-FirstOrDefault chains with a single call to FirstOrDefault

This commit is contained in:
ScottNZ
2013-11-11 21:20:19 +13:00
parent 9643609c31
commit 7c5f3cc0f1
8 changed files with 9 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ namespace OpenRA.Mods.RA.Widgets
if (current == null)
continue;
var actor = queue.Trait.AllItems().Where(a => a.Name == current.Item).FirstOrDefault();
var actor = queue.Trait.AllItems().FirstOrDefault(a => a.Name == current.Item);
if (actor == null)
continue;