aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory/Range/HostMemoryRange.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Memory/Range/HostMemoryRange.cs')
-rw-r--r--src/Ryujinx.Memory/Range/HostMemoryRange.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Ryujinx.Memory/Range/HostMemoryRange.cs b/src/Ryujinx.Memory/Range/HostMemoryRange.cs
index 79c649d8..a4abebb5 100644
--- a/src/Ryujinx.Memory/Range/HostMemoryRange.cs
+++ b/src/Ryujinx.Memory/Range/HostMemoryRange.cs
@@ -5,12 +5,12 @@ namespace Ryujinx.Memory.Range
/// <summary>
/// Range of memory composed of an address and size.
/// </summary>
- public struct HostMemoryRange : IEquatable<HostMemoryRange>
+ public readonly struct HostMemoryRange : IEquatable<HostMemoryRange>
{
/// <summary>
/// An empty memory range, with a null address and zero size.
/// </summary>
- public static HostMemoryRange Empty => new HostMemoryRange(0, 0);
+ public static HostMemoryRange Empty => new(0, 0);
/// <summary>
/// Start address of the range.
@@ -67,5 +67,15 @@ namespace Ryujinx.Memory.Range
{
return HashCode.Combine(Address, Size);
}
+
+ public static bool operator ==(HostMemoryRange left, HostMemoryRange right)
+ {
+ return left.Equals(right);
+ }
+
+ public static bool operator !=(HostMemoryRange left, HostMemoryRange right)
+ {
+ return !(left == right);
+ }
}
}