Merge pull request #710 from Sergio0694/dev/skip-useless-directive

Skip generating unnecessary using for constant buffer
このコミットが含まれているのは:
Sergio Pedri authored and GitHub committed 2023-12-09 02:49:06 +01:00
コミット e0a5f6e6af
2ファイル変更
+7 -2

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

+1 -1
ファイルの表示
@@ -13,7 +13,7 @@ partial class CanvasEffect
protected readonly ref struct EffectGraph
{
/// <summary>
///The owning <see cref="CanvasEffect"/> instance.
/// The owning <see cref="CanvasEffect"/> instance.
/// </summary>
private readonly CanvasEffect owner;
@@ -51,9 +51,14 @@ partial class ConstantBufferSyntaxProcessor
_ = usingDirectives.Add("global::System.CodeDom.Compiler");
_ = usingDirectives.Add("global::System.Diagnostics");
_ = usingDirectives.Add("global::System.Diagnostics.CodeAnalysis");
_ = usingDirectives.Add("global::System.Runtime.CompilerServices");
_ = usingDirectives.Add("global::System.Runtime.InteropServices");
// Only add this directive if the marshaller is also present, as it's only needed there
if (!info.Fields.IsEmpty)
{
_ = usingDirectives.Add("global::System.Runtime.CompilerServices");
}
// Declare the ConstantBuffer type
static void ConstantBufferCallback(TInfo info, IndentedTextWriter writer)
{