mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-03 13:56:26 +02:00
[Ryujinx.Tests.Unicorn] Address dotnet-format issues (#5391)
* dotnet format style --severity info Some changes were manually reverted. * Restore a few unused methods and variables * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Add comments to disabled warnings * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * Final dotnet format pass and fix naming rule violations
This commit is contained in:
parent
e3bacfa774
commit
bddb2a1483
5 changed files with 75 additions and 75 deletions
|
@ -2,7 +2,7 @@ using System;
|
|||
|
||||
namespace Ryujinx.Tests.Unicorn
|
||||
{
|
||||
public struct SimdValue : IEquatable<SimdValue>
|
||||
public readonly struct SimdValue : IEquatable<SimdValue>
|
||||
{
|
||||
private readonly ulong _e0;
|
||||
private readonly ulong _e1;
|
||||
|
@ -39,31 +39,29 @@ namespace Ryujinx.Tests.Unicorn
|
|||
return BitConverter.Int64BitsToDouble(GetInt64(index));
|
||||
}
|
||||
|
||||
public int GetInt32(int index) => (int)GetUInt32(index);
|
||||
public int GetInt32(int index) => (int)GetUInt32(index);
|
||||
public long GetInt64(int index) => (long)GetUInt64(index);
|
||||
|
||||
public uint GetUInt32(int index)
|
||||
{
|
||||
switch (index)
|
||||
return index switch
|
||||
{
|
||||
case 0: return (uint)(_e0 >> 0);
|
||||
case 1: return (uint)(_e0 >> 32);
|
||||
case 2: return (uint)(_e1 >> 0);
|
||||
case 3: return (uint)(_e1 >> 32);
|
||||
}
|
||||
|
||||
throw new ArgumentOutOfRangeException(nameof(index));
|
||||
0 => (uint)(_e0 >> 0),
|
||||
1 => (uint)(_e0 >> 32),
|
||||
2 => (uint)(_e1 >> 0),
|
||||
3 => (uint)(_e1 >> 32),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
}
|
||||
|
||||
public ulong GetUInt64(int index)
|
||||
{
|
||||
switch (index)
|
||||
return index switch
|
||||
{
|
||||
case 0: return _e0;
|
||||
case 1: return _e1;
|
||||
}
|
||||
|
||||
throw new ArgumentOutOfRangeException(nameof(index));
|
||||
0 => _e0,
|
||||
1 => _e1,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(index)),
|
||||
};
|
||||
}
|
||||
|
||||
public byte[] ToArray()
|
||||
|
@ -109,4 +107,4 @@ namespace Ryujinx.Tests.Unicorn
|
|||
return $"0x{_e1:X16}{_e0:X16}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue