mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
Fixing code smell
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user