Skip to content

Commit a1d4427

Browse files
committed
Segment comparison/equality fixed
1 parent 31a5f2f commit a1d4427

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Orm/Xtensive.Orm/Core/Segment.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,26 @@ public T EndOffset {
4444
}
4545

4646
/// <inheritdoc/>
47-
public bool Equals(Pair<T> other)
47+
public bool Equals(Segment<T> other)
4848
{
49-
return AdvancedComparerStruct<T>.System.Equals(Offset, other.First) &&
50-
AdvancedComparerStruct<T>.System.Equals(Length, other.Second);
49+
return AdvancedComparerStruct<T>.System.Equals(Offset, other.Offset) &&
50+
AdvancedComparerStruct<T>.System.Equals(Length, other.Length);
5151
}
5252

5353
/// <inheritdoc/>
54-
public int CompareTo(Pair<T> other)
54+
public int CompareTo(Segment<T> other)
5555
{
56-
int result = AdvancedComparerStruct<T>.System.Compare(Offset, other.First);
56+
int result = AdvancedComparerStruct<T>.System.Compare(Offset, other.Offset);
5757
if (result!=0)
5858
return result;
59-
return AdvancedComparerStruct<T>.System.Compare(Length, other.Second);
59+
return AdvancedComparerStruct<T>.System.Compare(Length, other.Length);
6060
}
6161

6262
#region Equals, GetHashCode
6363

6464
/// <inheritdoc/>
6565
public override bool Equals(object obj) =>
66-
obj is Pair<T> other && Equals(other);
66+
obj is Segment<T> other && Equals(other);
6767

6868
/// <inheritdoc/>
6969
public override int GetHashCode()

0 commit comments

Comments
 (0)