using Ryujinx.Common.Collections; using System; namespace Ryujinx.Cpu.Jit.HostTracked { internal class AddressIntrusiveRedBlackTree : IntrusiveRedBlackTree where T : IntrusiveRedBlackTreeNode, IComparable, IComparable { /// /// Retrieve the node that is considered equal to the specified address by the comparator. /// /// Address to compare with /// Node that is equal to public T GetNode(ulong address) { T node = Root; while (node != null) { int cmp = node.CompareTo(address); if (cmp < 0) { node = node.Left; } else if (cmp > 0) { node = node.Right; } else { return node; } } return null; } } }