mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 20:25:07 +08:00
17e6c22335
* chore: fix incorrect namespace * fix: potential null reference exceptions from ProxyManager
23 lines
467 B
C#
23 lines
467 B
C#
#region
|
|
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
#endregion
|
|
|
|
namespace nadena.dev.modular_avatar
|
|
{
|
|
internal class ObjectIdentityComparer<T> : IEqualityComparer<T>
|
|
{
|
|
public bool Equals(T x, T y)
|
|
{
|
|
return (object)x == (object)y;
|
|
}
|
|
|
|
public int GetHashCode(T obj)
|
|
{
|
|
if (obj == null) return 0;
|
|
return RuntimeHelpers.GetHashCode(obj);
|
|
}
|
|
}
|
|
} |