Skip to content

Commit

Permalink
comment fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Akulich authored and wcoder committed Oct 25, 2023
1 parent 70783d4 commit ee61471
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Softeq.XToolkit.WhiteLabel/Location/LocationModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public override bool Equals(object obj)
return Equals(obj as LocationModel);
}

public override int GetHashCode()
{
return HashCode.Combine(Latitude, Longitude);
}

public bool Equals(LocationModel other)
{
if (ReferenceEquals(null, other))
Expand All @@ -37,14 +42,8 @@ public bool Equals(LocationModel other)
return true;
}

return other is LocationModel model &&
Latitude == model.Latitude &&
Longitude == model.Longitude;
}

public override int GetHashCode()
{
return HashCode.Combine(Latitude, Longitude);
return Latitude == other.Latitude &&
Longitude == other.Longitude;
}
}
}

0 comments on commit ee61471

Please sign in to comment.