Fix CA2263

This commit is contained in:
RoosterDragon
2024-11-13 19:03:26 +00:00
committed by Pavel Penev
parent 332ab244a7
commit e2296ad2d1
6 changed files with 8 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Graphics
{
public const int SheetCount = 8;
static readonly string[] SheetIndexToTextureName = Exts.MakeArray(SheetCount, i => $"Texture{i}");
static readonly int UintSize = Marshal.SizeOf(typeof(uint));
static readonly int UintSize = Marshal.SizeOf<uint>();
readonly Renderer renderer;
readonly IShader shader;

View File

@@ -154,7 +154,7 @@ namespace OpenRA
public virtual void Initialize(MiniYaml yaml)
{
Initialize((T)FieldLoader.GetValue(nameof(value), typeof(T), yaml.Value));
Initialize(FieldLoader.GetValue<T>(nameof(value), yaml.Value));
}
public virtual void Initialize(T value)