ReferenceEqualityComparer.cs 407 B

12345678910111213141516171819
  1. using System.Collections.Generic;
  2. using System.Diagnostics.CodeAnalysis;
  3. namespace Ryujinx.Common
  4. {
  5. public class ReferenceEqualityComparer<T> : IEqualityComparer<T>
  6. where T : class
  7. {
  8. public bool Equals(T x, T y)
  9. {
  10. return x == y;
  11. }
  12. public int GetHashCode([DisallowNull] T obj)
  13. {
  14. return obj.GetHashCode();
  15. }
  16. }
  17. }