Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rameel committed Aug 29, 2017
1 parent f9f13c3 commit 0832322
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Main/src/Ranges/[Boundaries]/RangeBoundaryFrom`1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,17 +517,16 @@ public int CompareTo(T other) =>
[Pure]
int IComparable.CompareTo(object obj)
{
// ReSharper disable once UsePatternMatching
var otherA = obj as RangeBoundaryFrom<T>?;
if (otherA != null)
// ReSharper disable once MergeCastWithTypeCheck
if (obj is RangeBoundaryFrom<T>)
{
return CompareTo(otherA.GetValueOrDefault());
return CompareTo((RangeBoundaryFrom<T>)obj);
}
// ReSharper disable once UsePatternMatching
var otherB = obj as RangeBoundaryTo<T>?;
if (otherB != null)

// ReSharper disable once MergeCastWithTypeCheck
if (obj is RangeBoundaryTo<T>)
{
return CompareTo(otherB.GetValueOrDefault());
return CompareTo((RangeBoundaryTo<T>)obj);
}

return CompareTo((T)obj);
Expand Down

0 comments on commit 0832322

Please sign in to comment.