From b32042484f803d434a7124a96aca62d11398dc53 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 31 Oct 2022 23:37:09 +0100 Subject: [PATCH] Use nameof for property binding names --- .../Shaders/Interop/D2D1PixelShaderEffect.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs index f7346ea6..8cb272c5 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs @@ -175,23 +175,23 @@ public static unsafe class D2D1PixelShaderEffect writer.WriteRaw('\0'); fixed (char* pXml = writer.WrittenSpan) - fixed (char* pBufferPropertyName = "ConstantBuffer") - fixed (char* pResourceTextureManager0PropertyName = "ResourceTextureManager0") - fixed (char* pResourceTextureManager1PropertyName = "ResourceTextureManager1") - fixed (char* pResourceTextureManager2PropertyName = "ResourceTextureManager2") - fixed (char* pResourceTextureManager3PropertyName = "ResourceTextureManager3") - fixed (char* pResourceTextureManager4PropertyName = "ResourceTextureManager4") - fixed (char* pResourceTextureManager5PropertyName = "ResourceTextureManager5") - fixed (char* pResourceTextureManager6PropertyName = "ResourceTextureManager6") - fixed (char* pResourceTextureManager7PropertyName = "ResourceTextureManager7") - fixed (char* pResourceTextureManager8PropertyName = "ResourceTextureManager8") - fixed (char* pResourceTextureManager9PropertyName = "ResourceTextureManager9") - fixed (char* pResourceTextureManager10PropertyName = "ResourceTextureManager10") - fixed (char* pResourceTextureManager11PropertyName = "ResourceTextureManager11") - fixed (char* pResourceTextureManager12PropertyName = "ResourceTextureManager12") - fixed (char* pResourceTextureManager13PropertyName = "ResourceTextureManager13") - fixed (char* pResourceTextureManager14PropertyName = "ResourceTextureManager14") - fixed (char* pResourceTextureManager15PropertyName = "ResourceTextureManager15") + fixed (char* pBufferPropertyName = nameof(D2D1PixelShaderEffectProperty.ConstantBuffer)) + fixed (char* pResourceTextureManager0PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager0)) + fixed (char* pResourceTextureManager1PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager1)) + fixed (char* pResourceTextureManager2PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager2)) + fixed (char* pResourceTextureManager3PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager3)) + fixed (char* pResourceTextureManager4PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager4)) + fixed (char* pResourceTextureManager5PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager5)) + fixed (char* pResourceTextureManager6PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager6)) + fixed (char* pResourceTextureManager7PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager7)) + fixed (char* pResourceTextureManager8PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager8)) + fixed (char* pResourceTextureManager9PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager9)) + fixed (char* pResourceTextureManager10PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager10)) + fixed (char* pResourceTextureManager11PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager11)) + fixed (char* pResourceTextureManager12PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager12)) + fixed (char* pResourceTextureManager13PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager13)) + fixed (char* pResourceTextureManager14PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager14)) + fixed (char* pResourceTextureManager15PropertyName = nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager15)) fixed (char* pTransformMapperManagerPropertyName = nameof(D2D1PixelShaderEffectProperty.TransformMapperManager)) { // Prepare the effect binding functions