mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 20:17:15 +00:00
Fixing code smell
This commit is contained in:
parent
4a3ba4168d
commit
cef2ad3323
1 changed files with 8 additions and 2 deletions
|
|
@ -41,9 +41,15 @@ namespace ICD.Common.Utils.Extensions
|
|||
if (predicate == null)
|
||||
throw new ArgumentNullException("predicate");
|
||||
|
||||
T output = defaultItem;
|
||||
|
||||
foreach (T item in extends.Where(predicate))
|
||||
return item;
|
||||
return defaultItem;
|
||||
{
|
||||
output = item;
|
||||
break;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue