mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-07 08:24:37 +01:00
review
This commit is contained in:
parent
b2397efb25
commit
3aca09d0fb
2 changed files with 8 additions and 6 deletions
|
|
@ -12,7 +12,7 @@ using Lumina.Excel;
|
|||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using TerraFX.Interop.Windows;
|
||||
using Lumina.Text.ReadOnly;
|
||||
|
||||
namespace Dalamud.Game.Chat;
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ public interface ILogMessage : IEquatable<ILogMessage>
|
|||
/// </summary>
|
||||
/// <remarks>This can cause side effects such as playing sound effects and thus should only be used for debugging.</remarks>
|
||||
/// <returns>The formatted string.</returns>
|
||||
SeString FormatLogMessageForDebugging();
|
||||
ReadOnlySeString FormatLogMessageForDebugging();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -144,7 +144,7 @@ internal unsafe readonly struct LogMessage(LogMessageQueueItem* ptr) : ILogMessa
|
|||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public SeString FormatLogMessageForDebugging()
|
||||
public ReadOnlySeString FormatLogMessageForDebugging()
|
||||
{
|
||||
var logModule = RaptureLogModule.Instance();
|
||||
|
||||
|
|
@ -155,7 +155,9 @@ internal unsafe readonly struct LogMessage(LogMessageQueueItem* ptr) : ILogMessa
|
|||
SetName(logModule, this.TargetEntity);
|
||||
logModule->RaptureTextModule->FormatString(this.GameData.Value.Text.ToDalamudString().EncodeWithNullTerminator(), &ptr->Parameters, &utf8);
|
||||
|
||||
return SeString.Parse(utf8.AsSpan());
|
||||
var result = new ReadOnlySeString(utf8.AsSpan());
|
||||
utf8.Dtor();
|
||||
return result;
|
||||
|
||||
void SetName(RaptureLogModule* self, LogMessageEntity item)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
|
|||
|
||||
private readonly Queue<XivChatEntry> chatQueue = new();
|
||||
private readonly Dictionary<(string PluginName, uint CommandId), Action<uint, SeString>> dalamudLinkHandlers = new();
|
||||
private readonly List<IntPtr> seenLogMessageObjects = new();
|
||||
private readonly List<nint> seenLogMessageObjects = new();
|
||||
|
||||
private readonly Hook<PrintMessageDelegate> printMessageHook;
|
||||
private readonly Hook<InventoryItem.Delegates.Copy> inventoryItemCopyHook;
|
||||
|
|
@ -534,7 +534,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
|
|||
this.seenLogMessageObjects.Clear();
|
||||
foreach (ref var item in thisPtr->LogMessageQueue)
|
||||
{
|
||||
this.seenLogMessageObjects.Add((IntPtr)Unsafe.AsPointer(ref item));
|
||||
this.seenLogMessageObjects.Add((nint)Unsafe.AsPointer(ref item));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue