1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 02:26:40 +00:00
Ryujinx/src/Spv.Generator/DeterministicStringKey.cs
TSRBerry 2989c163a8
editorconfig: Set default encoding to UTF-8 (#5793)
* editorconfig: Add default charset

* Change file encoding from UTF-8-BOM to UTF-8
2023-12-04 14:17:13 +01:00

29 lines
660 B
C#

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);
}
}
}