Use collection expressions to create empty collections
このコミットが含まれているのは:
1 親
358f378796
コミット
8dc70916ac
13ファイル変更
+19
-19
検索条件に一致するファイルはありません
@@ -12,7 +12,7 @@ internal sealed class SemanticModelProvider(Compilation compilation)
|
||||
/// <summary>
|
||||
/// The map of loaded <see cref="SemanticModel"/> instances.
|
||||
/// </summary>
|
||||
private readonly Dictionary<SyntaxTree, SemanticModel> semanticModelsMap = new();
|
||||
private readonly Dictionary<SyntaxTree, SemanticModel> semanticModelsMap = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="SemanticModel"/> instance with info on a given <see cref="SyntaxNode"/>.
|
||||
|
||||
@@ -166,7 +166,7 @@ internal static partial class HlslKnownMethods
|
||||
{
|
||||
ILookup<string, MethodInfo> methodsLookup = typeof(Hlsl).GetMethods(BindingFlags.Public | BindingFlags.Static).ToLookup(static method => method.Name);
|
||||
|
||||
Dictionary<string, string> knownMethods = new();
|
||||
Dictionary<string, string> knownMethods = [];
|
||||
|
||||
// Go through the previously discovered methods to find the ones requiring parameters mapping
|
||||
foreach (KeyValuePair<string, string> pair in KnownMethods)
|
||||
|
||||
@@ -21,7 +21,7 @@ internal static partial class HlslKnownOperators
|
||||
/// </summary>
|
||||
private static IReadOnlyDictionary<string, string> BuildKnownOperatorsMap()
|
||||
{
|
||||
Dictionary<string, string> knownOperators = new();
|
||||
Dictionary<string, string> knownOperators = [];
|
||||
|
||||
// Programmatically load mappings for the intrinsic operators on each HLSL primitive type
|
||||
foreach ((Type Type, MethodInfo Operator, string IntrinsicName, bool RequiresParametersMatching) item in
|
||||
|
||||
@@ -87,8 +87,8 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
|
||||
this.shaderType = shaderType;
|
||||
this.staticMethods = staticMethods;
|
||||
this.instanceMethods = instanceMethods;
|
||||
this.localFunctions = new();
|
||||
this.implicitVariables = new();
|
||||
this.localFunctions = [];
|
||||
this.implicitVariables = [];
|
||||
this.isEntryPoint = isEntryPoint;
|
||||
}
|
||||
|
||||
@@ -112,8 +112,8 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
|
||||
{
|
||||
this.staticMethods = staticMethods;
|
||||
this.instanceMethods = instanceMethods;
|
||||
this.implicitVariables = new();
|
||||
this.localFunctions = new();
|
||||
this.implicitVariables = [];
|
||||
this.localFunctions = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする