chore: Fix most 6.51 warnings (#1514)

This commit is contained in:
KazWolfe 2023-10-31 13:21:55 -07:00 committed by GitHub
parent 9ccc389b0b
commit e538763f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 24 deletions

View file

@ -21,16 +21,6 @@ namespace Dalamud.Game.Addon.Lifecycle;
[ServiceManager.EarlyLoadedService]
internal unsafe class AddonLifecycle : IDisposable, IServiceType
{
/// <summary>
/// List of all AddonLifecycle ReceiveEvent Listener Hooks.
/// </summary>
internal readonly List<AddonLifecycleReceiveEventListener> ReceiveEventListeners = new();
/// <summary>
/// List of all AddonLifecycle Event Listeners.
/// </summary>
internal readonly List<AddonLifecycleEventListener> EventListeners = new();
private static readonly ModuleLog Log = new("AddonLifecycle");
[ServiceManager.ServiceDependency]
@ -81,6 +71,16 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
private delegate void AddonOnRequestedUpdateDelegate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData);
private delegate byte AddonOnRefreshDelegate(AtkUnitManager* unitManager, AtkUnitBase* addon, uint valueCount, AtkValue* values);
/// <summary>
/// Gets a list of all AddonLifecycle ReceiveEvent Listener Hooks.
/// </summary>
internal List<AddonLifecycleReceiveEventListener> ReceiveEventListeners { get; } = new();
/// <summary>
/// Gets a list of all AddonLifecycle Event Listeners.
/// </summary>
internal List<AddonLifecycleEventListener> EventListeners { get; } = new();
/// <inheritdoc/>
public void Dispose()

View file

@ -413,7 +413,7 @@ internal sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
newTextNode->AtkResNode.NodeID = nodeId;
newTextNode->AtkResNode.Type = NodeType.Text;
newTextNode->AtkResNode.NodeFlags = NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.Enabled | NodeFlags.RespondToMouse | NodeFlags.HasCollision | NodeFlags.EmitsEvents;
newTextNode->AtkResNode.DrawFlags = 12;
newTextNode->AtkResNode.ViewFlags = (NodeViewFlags)12;
newTextNode->AtkResNode.SetWidth(22);
newTextNode->AtkResNode.SetHeight(22);
newTextNode->AtkResNode.SetPositionFloat(-200, 2);

View file

@ -368,17 +368,6 @@ public class SeString
return null;
}
private static string GetMapLinkNameString(string placeName, int? instance, string coordinateString)
{
var instanceString = string.Empty;
if (instance is > 0 and < 10)
{
instanceString = (SeIconChar.Instance1 + instance.Value - 1).ToIconString();
}
return $"{placeName}{instanceString} {coordinateString}";
}
/// <summary>
/// Creates an SeString representing an entire payload chain that can be used to link party finder listings in the chat log.
/// </summary>
@ -512,4 +501,15 @@ public class SeString
{
return this.TextValue;
}
private static string GetMapLinkNameString(string placeName, int? instance, string coordinateString)
{
var instanceString = string.Empty;
if (instance is > 0 and < 10)
{
instanceString = (SeIconChar.Instance1 + instance.Value - 1).ToIconString();
}
return $"{placeName}{instanceString} {coordinateString}";
}
}

View file

@ -249,7 +249,6 @@ internal class DalamudInterface : IDisposable, IServiceType
/// <summary>
/// Opens the <see cref="PluginInstallerWindow"/> on the plugin installed.
/// </summary>
/// <param name="kind">The page of the installer to open.</param>
public void OpenPluginInstaller()
{
this.pluginWindow.OpenTo(this.configuration.PluginInstallerOpen);
@ -394,6 +393,7 @@ internal class DalamudInterface : IDisposable, IServiceType
/// <summary>
/// Toggles the <see cref="PluginInstallerWindow"/>.
/// </summary>
/// <param name="kind">The page of the installer to open.</param>
public void TogglePluginInstallerWindowTo(PluginInstallerWindow.PluginInstallerOpenKind kind) => this.pluginWindow.ToggleTo(kind);
/// <summary>

View file

@ -215,7 +215,7 @@ internal unsafe class UiDebug
while (b > byte.MaxValue) b -= byte.MaxValue;
while (b < byte.MinValue) b += byte.MaxValue;
textNode->AlignmentFontType = (byte)b;
textNode->AtkResNode.DrawFlags |= 0x1;
textNode->AtkResNode.ViewFlags |= NodeViewFlags.IsDirty;
}
ImGui.Text($"Color: #{textNode->TextColor.R:X2}{textNode->TextColor.G:X2}{textNode->TextColor.B:X2}{textNode->TextColor.A:X2}");

View file

@ -1,6 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Linq;
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Interface.Utility;
using ImGuiNET;

View file

@ -1,6 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using System.Runtime.InteropServices;
using CheapLoc;
using Dalamud.Configuration.Internal;
using Dalamud.Game.ClientState.Keys;