mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 11:29:58 -04:00
Import the base tree (MIT, see LICENSE)
This commit is contained in:
29
tools/vendor/ryujinx/src/Spv.Generator/DeterministicStringKey.cs
vendored
Normal file
29
tools/vendor/ryujinx/src/Spv.Generator/DeterministicStringKey.cs
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace Spv.Generator
|
||||
{
|
||||
internal class DeterministicStringKey : IEquatable<DeterministicStringKey>
|
||||
{
|
||||
private readonly string _value;
|
||||
|
||||
public DeterministicStringKey(string value)
|
||||
{
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return DeterministicHashCode.GetHashCode(_value);
|
||||
}
|
||||
|
||||
public bool Equals(DeterministicStringKey other)
|
||||
{
|
||||
return _value == other?._value;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DeterministicStringKey key && Equals(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user