Replace ToArray() with collection expressions

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-20 23:06:22 +01:00
1 親 6897ecfcb2
コミット 358f378796
4ファイル変更
+6 -7

検索条件に一致するファイルはありません

+2 -2
ファイルの表示
@@ -150,7 +150,7 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
BlockSyntax implicitBlock = Block(this.implicitVariables.Select(static v => LocalDeclarationStatement(v)).ToArray());
// Add the tracked implicit declarations (at the start of the body)
updatedNode = updatedNode.WithBody(implicitBlock).AddBodyStatements(updatedNode.Body!.Statements.ToArray());
updatedNode = updatedNode.WithBody(implicitBlock).AddBodyStatements([.. updatedNode.Body!.Statements]);
}
return updatedNode;
@@ -184,7 +184,7 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
{
BlockSyntax implicitBlock = Block(this.implicitVariables.Select(static v => LocalDeclarationStatement(v)).ToArray());
updatedNode = updatedNode.WithBody(implicitBlock).AddBodyStatements(updatedNode.Body!.Statements.ToArray());
updatedNode = updatedNode.WithBody(implicitBlock).AddBodyStatements([.. updatedNode.Body!.Statements]);
}
return updatedNode;