mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-13 03:35:04 +00:00
refactor: Removing redundant code
This commit is contained in:
@@ -106,24 +106,6 @@ namespace ICD.Common.Utils.Extensions
|
||||
if (comparer == null)
|
||||
throw new ArgumentNullException("comparer");
|
||||
|
||||
if (extends.Count == 0)
|
||||
{
|
||||
extends.Add(item);
|
||||
return;
|
||||
}
|
||||
|
||||
if (comparer.Compare(extends[extends.Count - 1], item) <= 0)
|
||||
{
|
||||
extends.Add(item);
|
||||
return;
|
||||
}
|
||||
|
||||
if (comparer.Compare(extends[0], item) >= 0)
|
||||
{
|
||||
extends.Insert(0, item);
|
||||
return;
|
||||
}
|
||||
|
||||
int index = extends.BinarySearch(item, comparer);
|
||||
if (index < 0)
|
||||
index = ~index;
|
||||
|
||||
Reference in New Issue
Block a user