Added more SkipLocalsInit

This commit is contained in:
DarthAffe committed 2024-07-06 19:38:34 +02:00
1 parent 822d9fa6f1
commit 3ccb62538d
13 files changed
+37 -5

No files matched your search

+4
View File
@@ -30,6 +30,7 @@ internal class Colors : IGeneratorFeature
// ReSharper disable ReplaceWithPrimaryConstructorParameter
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace HPPH;
@@ -44,6 +45,7 @@ internal class Colors : IGeneratorFeature
/// <param name="{{colorFormat.SecondEntry}}">The {{colorFormat.SecondEntryName}}-component of the color.</param>
/// <param name="{{colorFormat.ThirdEntry}}">The {{colorFormat.ThirdEntryName}}-component of the color.</param>
[DebuggerDisplay("[A: {A}, R: {R}, G: {G}, B: {B}]")]
[SkipLocalsInit]
[StructLayout(LayoutKind.Sequential)]
public readonly partial struct {{colorFormat.TypeName}}(byte {{colorFormat.FirstEntry}}, byte {{colorFormat.SecondEntry}}, byte {{colorFormat.ThirdEntry}}): IColor
{
@@ -89,6 +91,7 @@ internal class Colors : IGeneratorFeature
// ReSharper disable ReplaceWithPrimaryConstructorParameter
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace HPPH;
@@ -104,6 +107,7 @@ internal class Colors : IGeneratorFeature
/// <param name="{{colorFormat.ThirdEntry}}">The {{colorFormat.ThirdEntryName}}-component of the color.</param>
/// <param name="{{colorFormat.FourthEntry}}">The {{colorFormat.FourthEntryName}}-component of the color.</param>
[DebuggerDisplay("[A: {A}, R: {R}, G: {G}, B: {B}]")]
[SkipLocalsInit]
[StructLayout(LayoutKind.Sequential)]
public readonly partial struct {{colorFormat.TypeName}}(byte {{colorFormat.FirstEntry}}, byte {{colorFormat.SecondEntry}}, byte {{colorFormat.ThirdEntry}}, byte {{colorFormat.FourthEntry}}) : IColor
{