Make Rectangle a readonly struct.
This commit is contained in:
@@ -13,13 +13,12 @@ using System;
|
|||||||
|
|
||||||
namespace OpenRA.Primitives
|
namespace OpenRA.Primitives
|
||||||
{
|
{
|
||||||
public struct Rectangle : IEquatable<Rectangle>
|
public readonly struct Rectangle : IEquatable<Rectangle>
|
||||||
{
|
{
|
||||||
// TODO: Make these readonly: this will require a lot of changes to the UI logic
|
public readonly int X;
|
||||||
public int X;
|
public readonly int Y;
|
||||||
public int Y;
|
public readonly int Width;
|
||||||
public int Width;
|
public readonly int Height;
|
||||||
public int Height;
|
|
||||||
public static readonly Rectangle Empty;
|
public static readonly Rectangle Empty;
|
||||||
|
|
||||||
public static Rectangle FromLTRB(int left, int top, int right, int bottom)
|
public static Rectangle FromLTRB(int left, int top, int right, int bottom)
|
||||||
|
|||||||
Reference in New Issue
Block a user