Fix build warnings for fun

This commit is contained in:
Loporrit
2025-06-30 15:53:11 +00:00
parent c8e988abc5
commit dd42bf0913
18 changed files with 54 additions and 47 deletions

View File

@@ -18,7 +18,7 @@ internal sealed class DalamudLogger : ILogger
_pluginLog = pluginLog;
}
public IDisposable BeginScope<TState>(TState state) => default!;
public IDisposable BeginScope<TState>(TState state) where TState : notnull => default!;
public bool IsEnabled(LogLevel logLevel)
{

View File

@@ -27,6 +27,7 @@ public unsafe sealed class GameChatHooks : IDisposable
private readonly ILogger<GameChatHooks> _logger;
#region signatures
#pragma warning disable CS0649
// I do not know what kind of black magic this function performs
[Signature("E8 ?? ?? ?? ?? 0F B7 7F 08 48 8B CE")]
private readonly delegate* unmanaged<PronounModule*, Utf8String*, byte, Utf8String*> ProcessStringStep2;
@@ -62,7 +63,7 @@ public unsafe sealed class GameChatHooks : IDisposable
DetourName = nameof(ShouldDoNameLookupDetour)
)]
private Hook<ShouldDoNameLookupDelegate>? ShouldDoNameLookupHook { get; init; }
#pragma warning restore CS0649
#endregion
private ChatChannelOverride? _chatChannelOverride;

View File

@@ -94,6 +94,7 @@ public sealed class IpcCallerBrio : IIpcCaller
var gameObject = await _dalamudUtilService.CreateGameObjectAsync(address).ConfigureAwait(false);
if (gameObject == null) return default;
var data = await _dalamudUtilService.RunOnFrameworkThread(() => _brioGetModelTransform.InvokeFunc(gameObject)).ConfigureAwait(false);
if (data.Item1 == null || data.Item2 == null || data.Item3 == null) return default;
_logger.LogDebug("Getting Transform from Actor {actor}", gameObject.Name.TextValue);
return new WorldData()

View File

@@ -16,6 +16,8 @@ public unsafe class VfxSpawnManager : DisposableMediatorSubscriberBase
{
private static readonly byte[] _pool = "Client.System.Scheduler.Instance.VfxObject\0"u8.ToArray();
#region signatures
#pragma warning disable CS0649
[Signature("E8 ?? ?? ?? ?? F3 0F 10 35 ?? ?? ?? ?? 48 89 43 08")]
private readonly delegate* unmanaged<byte*, byte*, VfxStruct*> _staticVfxCreate;
@@ -24,6 +26,8 @@ public unsafe class VfxSpawnManager : DisposableMediatorSubscriberBase
[Signature("40 53 48 83 EC 20 48 8B D9 48 8B 89 ?? ?? ?? ?? 48 85 C9 74 28 33 D2 E8 ?? ?? ?? ?? 48 8B 8B ?? ?? ?? ?? 48 85 C9")]
private readonly delegate* unmanaged<VfxStruct*, nint> _staticVfxRemove;
#pragma warning restore CS0649
#endregion
public VfxSpawnManager(ILogger<VfxSpawnManager> logger, IGameInteropProvider gameInteropProvider, MareMediator mareMediator)
: base(logger, mareMediator)