Fix warnings

This commit is contained in:
Liza 2024-09-14 00:20:46 +02:00
parent 412d157f0d
commit c23ba27103
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 45 additions and 36 deletions

View File

@ -70,7 +70,7 @@ internal sealed class CreationUtilsComponent
_logger = logger; _logger = logger;
} }
public unsafe void Draw() public void Draw()
{ {
Debug.Assert(_clientState.LocalPlayer != null, "_clientState.LocalPlayer != null"); Debug.Assert(_clientState.LocalPlayer != null, "_clientState.LocalPlayer != null");
@ -90,6 +90,7 @@ internal sealed class CreationUtilsComponent
} }
#if false #if false
unsafe {
var questManager = QuestManager.Instance(); var questManager = QuestManager.Instance();
if (questManager != null) if (questManager != null)
{ {
@ -115,9 +116,11 @@ internal sealed class CreationUtilsComponent
} }
} }
} }
}
#endif #endif
#if false #if false
unsafe {
var questManager = QuestManager.Instance(); var questManager = QuestManager.Instance();
if (questManager != null) if (questManager != null)
{ {
@ -127,9 +130,11 @@ internal sealed class CreationUtilsComponent
ImGui.Text($"Daily Quest {i}: {dailyQuest.QuestId}, {dailyQuest.IsCompleted}"); ImGui.Text($"Daily Quest {i}: {dailyQuest.QuestId}, {dailyQuest.IsCompleted}");
} }
} }
}
#endif #endif
#if false #if false
unsafe {
var director = UIState.Instance()->DirectorTodo.Director; var director = UIState.Instance()->DirectorTodo.Director;
if (director != null) if (director != null)
{ {
@ -144,6 +149,7 @@ internal sealed class CreationUtilsComponent
ImGui.Text($" EHI F: {director->EventHandlerInfo->Flags}"); ImGui.Text($" EHI F: {director->EventHandlerInfo->Flags}");
} }
} }
}
#endif #endif
if (_targetManager.Target != null) if (_targetManager.Target != null)

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using Dalamud.Interface; using Dalamud.Interface;
@ -18,6 +19,7 @@ namespace Questionable.Windows.QuestComponents;
internal sealed class EventInfoComponent internal sealed class EventInfoComponent
{ {
[SuppressMessage("ReSharper", "CollectionNeverUpdated.Local")]
private readonly List<EventQuest> _eventQuests = private readonly List<EventQuest> _eventQuests =
[ [
]; ];
@ -45,6 +47,7 @@ internal sealed class EventInfoComponent
_pluginInterface = pluginInterface; _pluginInterface = pluginInterface;
} }
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private static DateTime AtDailyReset(DateOnly date) private static DateTime AtDailyReset(DateOnly date)
{ {
return new DateTime(date, new TimeOnly(14, 59), DateTimeKind.Utc); return new DateTime(date, new TimeOnly(14, 59), DateTimeKind.Utc);