Use ImmutableCollectionsMarshal in .NET 8 projects

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-21 13:58:19 +01:00
1 親 b1eb81cb2b
コミット ba70535d30
2ファイル変更
+4 -3

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

@@ -3,7 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.D2D1.WinUI.Buffers;
using ComputeSharp.D2D1.WinUI.Collections;
@@ -254,7 +254,7 @@ partial class PixelShaderEffect<T>
indices[i] = descriptions[i].Index;
}
return Unsafe.As<int[], ImmutableArray<int>>(ref indices);
return ImmutableCollectionsMarshal.AsImmutableArray(indices);
}
}
}
+2 -1
ファイルの表示
@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ComputeSharp.D2D1.WinUI.Buffers;
using ComputeSharp.D2D1.WinUI.Collections;
using Windows.Graphics.Effects;
@@ -223,7 +224,7 @@ partial class PixelShaderEffect<T>
indices[i] = i;
}
return Unsafe.As<int[], ImmutableArray<int>>(ref indices);
return ImmutableCollectionsMarshal.AsImmutableArray(indices);
}
}
}