mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
refactor: Removing redundant code
This commit is contained in:
parent
54fbd7eaa8
commit
60a19fe7f8
1 changed files with 0 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue