.
This commit is contained in:
parent
00b86407a2
commit
82cae0455a
@ -13,7 +13,7 @@ namespace ARMeilleure.CodeGen.Arm64
|
||||
|
||||
public static void RunPass(ControlFlowGraph cfg)
|
||||
{
|
||||
var constants = new Dictionary<ulong, Operand>();
|
||||
Dictionary<ulong, Operand> constants = [];
|
||||
|
||||
Operand GetConstantCopy(BasicBlock block, Operation operation, Operand source)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace ARMeilleure.CodeGen.X86
|
||||
|
||||
public static void RunPass(ControlFlowGraph cfg)
|
||||
{
|
||||
var constants = new Dictionary<ulong, Operand>();
|
||||
Dictionary<ulong, Operand> constants = [];
|
||||
|
||||
Operand GetConstantCopy(BasicBlock block, Operation operation, Operand source)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ namespace ARMeilleure.Translation
|
||||
Logger.EndPass(PassName.RegisterUsage);
|
||||
|
||||
var retType = OperandType.I64;
|
||||
var argTypes = new OperandType[] { OperandType.I64 };
|
||||
OperandType[] argTypes = [ OperandType.I64 ];
|
||||
|
||||
var options = highCq ? CompilerOptions.HighCq : CompilerOptions.None;
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
_registerToGroupMapping = new byte[BlockSize];
|
||||
_callbacks = new Action[entries.Length];
|
||||
|
||||
var fieldToDelegate = new Dictionary<string, int>();
|
||||
Dictionary<string, int> fieldToDelegate = [];
|
||||
|
||||
for (int entryIndex = 0; entryIndex < entries.Length; entryIndex++)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ namespace Ryujinx.Graphics.OpenGL.Effects.Smaa
|
||||
var blendShaderData = EmbeddedResources.ReadAllText("Ryujinx.Graphics.OpenGL/Effects/Shaders/smaa_blend.glsl");
|
||||
var neighbourShaderData = EmbeddedResources.ReadAllText("Ryujinx.Graphics.OpenGL/Effects/Shaders/smaa_neighbour.glsl");
|
||||
|
||||
var shaders = new string[] { presets, edgeShaderData };
|
||||
string[] shaders = [ presets, edgeShaderData ];
|
||||
var edgeProgram = ShaderHelper.CompileProgram(shaders, ShaderType.ComputeShader);
|
||||
|
||||
shaders[1] = blendShaderData;
|
||||
|
@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||
{
|
||||
AstBlockVisitor visitor = new(block);
|
||||
|
||||
var loopTargets = new Dictionary<AstBlock, (SpvInstruction, SpvInstruction)>();
|
||||
Dictionary<AstBlock, (SpvInstruction, SpvInstruction)> loopTargets = [];
|
||||
|
||||
context.LoopTargets = loopTargets;
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
|
||||
private static IReadOnlyDictionary<int, AttributeEntry> CreateMap()
|
||||
{
|
||||
var map = new Dictionary<int, AttributeEntry>();
|
||||
Dictionary<int, AttributeEntry> map = [];
|
||||
|
||||
Add(map, 0x060, AggregateType.S32, IoVariable.PrimitiveId, StagesMask.TessellationGeometryFragment, StagesMask.Geometry);
|
||||
Add(map, 0x064, AggregateType.S32, IoVariable.Layer, StagesMask.Fragment, StagesMask.VertexTessellationGeometry);
|
||||
@ -84,7 +84,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
|
||||
private static IReadOnlyDictionary<int, AttributeEntry> CreatePerPatchMap()
|
||||
{
|
||||
var map = new Dictionary<int, AttributeEntry>();
|
||||
Dictionary<int, AttributeEntry> map = [];
|
||||
|
||||
Add(map, 0x000, AggregateType.Vector4 | AggregateType.FP32, IoVariable.TessellationLevelOuter, StagesMask.TessellationEvaluation, StagesMask.TessellationControl);
|
||||
Add(map, 0x010, AggregateType.Vector2 | AggregateType.FP32, IoVariable.TessellationLevelInner, StagesMask.TessellationEvaluation, StagesMask.TessellationControl);
|
||||
|
@ -138,7 +138,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm.Proxy
|
||||
|
||||
lock (_scanLock)
|
||||
{
|
||||
var results = new Dictionary<ulong, NetworkInfo>();
|
||||
Dictionary<ulong, NetworkInfo> results = [];
|
||||
|
||||
foreach (KeyValuePair<ulong, NetworkInfo> last in _scanResultsLast)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
||||
{
|
||||
fileSystem.ImportTickets(partitionFileSystem);
|
||||
|
||||
var programs = new Dictionary<ulong, ContentMetaData>();
|
||||
Dictionary<ulong, ContentMetaData> programs = [];
|
||||
|
||||
foreach (DirectoryEntryEx fileEntry in partitionFileSystem.EnumerateEntries("/", "*.cnmt.nca"))
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ namespace Ryujinx.Ava.Common.Locale
|
||||
|
||||
private static Dictionary<LocaleKeys, string> LoadJsonLanguage(string languageCode)
|
||||
{
|
||||
var localeStrings = new Dictionary<LocaleKeys, string>();
|
||||
Dictionary<LocaleKeys, string> localeStrings = [];
|
||||
|
||||
_localeData ??= EmbeddedResources.ReadAllText("Ryujinx/Assets/locales.json")
|
||||
.Into(it => JsonHelper.Deserialize(it, LocalesJsonContext.Default.LocalesJson));
|
||||
|
@ -50,7 +50,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
public static SKColor GetColor(SKBitmap image)
|
||||
{
|
||||
var colors = new PaletteColor[TotalColors];
|
||||
var dominantColorBin = new Dictionary<int, int>();
|
||||
Dictionary<int, int> dominantColorBin = [];
|
||||
|
||||
var buffer = GetBuffer(image);
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Ryujinx.Ava.Utilities.SystemInfo
|
||||
|
||||
if (cpuName == null)
|
||||
{
|
||||
var cpuDict = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
Dictionary<string, string> cpuDict = new(StringComparer.Ordinal)
|
||||
{
|
||||
["model name"] = null,
|
||||
["Processor"] = null,
|
||||
@ -28,7 +28,7 @@ namespace Ryujinx.Ava.Utilities.SystemInfo
|
||||
cpuName = cpuDict["model name"] ?? cpuDict["Processor"] ?? cpuDict["Hardware"] ?? "Unknown";
|
||||
}
|
||||
|
||||
var memDict = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
Dictionary<string, string> memDict = new(StringComparer.Ordinal)
|
||||
{
|
||||
["MemTotal"] = null,
|
||||
["MemAvailable"] = null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user