From f5de8be3f0fca171c3ada05c554665095be284b6 Mon Sep 17 00:00:00 2001 From: Sieds Aalberts Date: Thu, 30 Jun 2022 13:10:13 +0200 Subject: [PATCH] Rectangle equals, trivial optimization. --- OpenRA.Game/Primitives/Rectangle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Primitives/Rectangle.cs b/OpenRA.Game/Primitives/Rectangle.cs index 2393575888..82269a8c84 100644 --- a/OpenRA.Game/Primitives/Rectangle.cs +++ b/OpenRA.Game/Primitives/Rectangle.cs @@ -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)