mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-10 04:46:27 +02:00
misc: chore: Use explicit types in common project
This commit is contained in:
parent
97188556d8
commit
a97fd4beb1
15 changed files with 59 additions and 56 deletions
|
@ -23,7 +23,7 @@ namespace Ryujinx.Common.Configuration
|
|||
|
||||
public static EnabledDirtyHack Unpack(ulong packedHack)
|
||||
{
|
||||
var unpackedFields = packedHack.UnpackBitFields(PackedFormat);
|
||||
uint[] unpackedFields = packedHack.UnpackBitFields(PackedFormat);
|
||||
if (unpackedFields is not [var hack, var value])
|
||||
throw new Exception("The unpack operation on the integer resulted in an invalid unpacked result.");
|
||||
|
||||
|
@ -53,7 +53,7 @@ namespace Ryujinx.Common.Configuration
|
|||
public static implicit operator DirtyHacks(EnabledDirtyHack[] hacks) => new(hacks);
|
||||
public static implicit operator DirtyHacks(ulong[] packedHacks) => new(packedHacks);
|
||||
|
||||
public new int this[DirtyHack hack] => TryGetValue(hack, out var value) ? value : -1;
|
||||
public new int this[DirtyHack hack] => TryGetValue(hack, out int value) ? value : -1;
|
||||
|
||||
public bool IsEnabled(DirtyHack hack) => ContainsKey(hack);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue