Fixing code smell

This commit is contained in:
Chris Cameron
2018-03-01 17:03:25 -05:00
parent 4a3ba4168d
commit cef2ad3323

View File

@@ -41,9 +41,15 @@ namespace ICD.Common.Utils.Extensions
if (predicate == null) if (predicate == null)
throw new ArgumentNullException("predicate"); throw new ArgumentNullException("predicate");
T output = defaultItem;
foreach (T item in extends.Where(predicate)) foreach (T item in extends.Where(predicate))
return item; {
return defaultItem; output = item;
break;
}
return output;
} }
/// <summary> /// <summary>