From 9bb6cdf50721ae02a46caf3d22549483ab5093ca Mon Sep 17 00:00:00 2001 From: Seweryn Szulgan Date: Wed, 1 Jan 2020 07:11:12 +0000 Subject: [PATCH] Dead Code Removal --- .../Structs/AddressRange.cs | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 SonicHeroes.Utils.OneRedirector/Structs/AddressRange.cs diff --git a/SonicHeroes.Utils.OneRedirector/Structs/AddressRange.cs b/SonicHeroes.Utils.OneRedirector/Structs/AddressRange.cs deleted file mode 100644 index 1e4d09b..0000000 --- a/SonicHeroes.Utils.OneRedirector/Structs/AddressRange.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace SonicHeroes.Utils.OneRedirector.Structs -{ - /// - /// Defines a physical address range with a minimum and maximum address. - /// - internal struct AddressRange - { - public int Start; - public int End; - - public AddressRange(int start, int end) - { - Start = start; - End = end; - } - - /// - /// Returns true if the other address range is completely inside - /// the current address range. - /// - public bool Contains(ref AddressRange otherRange) - { - if (otherRange.Start >= this.Start && - otherRange.End <= this.End) - return true; - - return false; - } - - /// - /// Returns true if the other address range intersects another address range, i.e. - /// start or end of this range falls inside other range. - /// - public bool Overlaps(ref AddressRange otherRange) - { - if (PointInRange(ref otherRange, this.Start)) - return true; - - if (PointInRange(ref otherRange, this.End)) - return true; - - if (PointInRange(ref this, otherRange.Start)) - return true; - - if (PointInRange(ref this, otherRange.End)) - return true; - - return false; - } - - /// - /// Returns true if a number "point", is between min and max of address range. - /// - private bool PointInRange(ref AddressRange range, long point) - { - if (point >= range.Start && - point <= range.End) - return true; - - return false; - } - } -}