Fix more analyzer warnings (mostly missing readonly)

このコミットが含まれているのは:
Sergio Pedri committed 2022-10-22 19:11:38 +02:00
1 親 e96f217af2
コミット 0ff4d41a0a
11ファイル変更
+15 -16

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

+3 -4
ファイルの表示
@@ -340,8 +340,6 @@ public static unsafe class D2D1PixelShaderEffect
public static ReadOnlyMemory<byte> GetRegistrationBlob<T>(ID2D1TransformMapperFactory<T>? mapperFactory, out Guid effectId)
where T : unmanaged, ID2D1PixelShader
{
effectId = default;
PixelShaderEffect.For<T>.Initialize(mapperFactory);
ArrayPoolBufferWriter<byte> writer = new(ArrayPoolBinaryWriter.DefaultInitialBufferSize);
@@ -514,12 +512,13 @@ public static unsafe class D2D1PixelShaderEffect
// Effect factory
writer.WriteRaw((nint)PixelShaderEffect.For<T>.Factory);
effectId = PixelShaderEffect.For<T>.Id;
byte[] registrationBlob = writer.WrittenSpan.ToArray();
writer.Dispose();
// Extract the effect id (the same that was encoded in the registration blob)
effectId = PixelShaderEffect.For<T>.Id;
return registrationBlob;
}