Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
Improve Equals Size2, SizeF
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSt committed Sep 19, 2016
1 parent 378f529 commit 0fe1315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Source/SharpDX/Size2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ public bool Equals(Size2 other)
/// <inheritdoc/>
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (obj.GetType() != typeof(Size2)) return false;
if (!(obj is Size2))
return false;

return Equals((Size2)obj);
}

Expand Down
5 changes: 3 additions & 2 deletions Source/SharpDX/Size2F.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ public bool Equals(Size2F other)
/// <inheritdoc/>
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (obj.GetType() != typeof(Size2F)) return false;
if (!(obj is Size2F))
return false;

return Equals((Size2F)obj);
}

Expand Down

0 comments on commit 0fe1315

Please sign in to comment.