Rectangle equals, trivial optimization.
This commit is contained in:
committed by
Pavel Penev
parent
c8df1e864c
commit
f5de8be3f0
@@ -34,7 +34,7 @@ namespace OpenRA.Primitives
|
|||||||
|
|
||||||
public static bool operator ==(Rectangle left, Rectangle right)
|
public static bool operator ==(Rectangle left, Rectangle right)
|
||||||
{
|
{
|
||||||
return left.Location == right.Location && left.Size == right.Size;
|
return left.X == right.X && left.Y == right.Y && left.Width == right.Width && left.Height == right.Height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool operator !=(Rectangle left, Rectangle right)
|
public static bool operator !=(Rectangle left, Rectangle right)
|
||||||
|
|||||||
Reference in New Issue
Block a user