Rectangle equals, trivial optimization.

This commit is contained in:
Sieds Aalberts
2022-06-30 13:10:13 +02:00
committed by Pavel Penev
parent c8df1e864c
commit f5de8be3f0

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Primitives
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)