fix errors/warnings

This commit is contained in:
Kaz Wolfe 2024-06-16 16:45:18 -07:00
parent 452305be1d
commit 28ff62e488
No known key found for this signature in database
GPG key ID: 258813F53A16EBB4
23 changed files with 351 additions and 335 deletions

View file

@ -5,7 +5,7 @@ namespace Dalamud.Interface.Textures;
/// <summary>Represents a lookup for a game icon.</summary>
public readonly record struct GameIconLookup
{
/// <summary>Initializes a new instance of the <see cref="GameIconLookup"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="GameIconLookup"/> struct.</summary>
/// <param name="iconId">The icon ID.</param>
/// <param name="itemHq">Whether the HQ icon is requested, where HQ is in the context of items.</param>
/// <param name="hiRes">Whether the high-resolution icon is requested.</param>
@ -17,11 +17,7 @@ public readonly record struct GameIconLookup
this.HiRes = hiRes;
this.Language = language;
}
public static implicit operator GameIconLookup(int iconId) => new(checked((uint)iconId));
public static implicit operator GameIconLookup(uint iconId) => new(iconId);
/// <summary>Gets the icon ID.</summary>
public uint IconId { get; init; }
@ -39,6 +35,10 @@ public readonly record struct GameIconLookup
/// </remarks>
public ClientLanguage? Language { get; init; }
public static implicit operator GameIconLookup(int iconId) => new(checked((uint)iconId));
public static implicit operator GameIconLookup(uint iconId) => new(iconId);
/// <inheritdoc/>
public override string ToString()
{

View file

@ -7,7 +7,7 @@ public record struct RawImageSpecification
{
private const string FormatNotSupportedMessage = $"{nameof(DxgiFormat)} is not supported.";
/// <summary>Initializes a new instance of the <see cref="RawImageSpecification"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="RawImageSpecification"/> struct.</summary>
/// <param name="width">The width of the raw image.</param>
/// <param name="height">The height of the raw image.</param>
/// <param name="dxgiFormat">The DXGI format of the raw image.</param>
@ -31,14 +31,14 @@ public record struct RawImageSpecification
this.DxgiFormat = dxgiFormat;
}
/// <summary>Initializes a new instance of the <see cref="RawImageSpecification"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="RawImageSpecification"/> struct.</summary>
/// <param name="desc">The source texture description.</param>
internal RawImageSpecification(in D3D11_TEXTURE2D_DESC desc)
: this((int)desc.Width, (int)desc.Height, (int)desc.Format)
{
}
/// <summary>Initializes a new instance of the <see cref="RawImageSpecification"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="RawImageSpecification"/> struct.</summary>
/// <param name="desc">The source texture description.</param>
/// <param name="pitch">The pitch of the raw image in bytes.</param>
internal RawImageSpecification(in D3D11_TEXTURE2D_DESC desc, uint pitch)