mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #2494 from Haselnussbomber/remove-obsoleted-sestring-casts
[API14] Remove obsolete casts from Lumina.Text.SeString
This commit is contained in:
commit
abcddde591
4 changed files with 11 additions and 23 deletions
|
|
@ -3,7 +3,6 @@ using System.Globalization;
|
||||||
using Lumina.Text.ReadOnly;
|
using Lumina.Text.ReadOnly;
|
||||||
|
|
||||||
using DSeString = Dalamud.Game.Text.SeStringHandling.SeString;
|
using DSeString = Dalamud.Game.Text.SeStringHandling.SeString;
|
||||||
using LSeString = Lumina.Text.SeString;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.Text.Evaluator;
|
namespace Dalamud.Game.Text.Evaluator;
|
||||||
|
|
||||||
|
|
@ -71,9 +70,6 @@ public readonly struct SeStringParameter
|
||||||
|
|
||||||
public static implicit operator SeStringParameter(ReadOnlySeStringSpan value) => new(new ReadOnlySeString(value));
|
public static implicit operator SeStringParameter(ReadOnlySeStringSpan value) => new(new ReadOnlySeString(value));
|
||||||
|
|
||||||
[Obsolete("Switch to using ReadOnlySeString instead of Lumina's SeString.", true)]
|
|
||||||
public static implicit operator SeStringParameter(LSeString value) => new(new ReadOnlySeString(value.RawData));
|
|
||||||
|
|
||||||
public static implicit operator SeStringParameter(DSeString value) => new(new ReadOnlySeString(value.Encode()));
|
public static implicit operator SeStringParameter(DSeString value) => new(new ReadOnlySeString(value.Encode()));
|
||||||
|
|
||||||
public static implicit operator SeStringParameter(string value) => new(value);
|
public static implicit operator SeStringParameter(string value) => new(value);
|
||||||
|
|
|
||||||
|
|
@ -113,14 +113,6 @@ public class SeString
|
||||||
/// <returns>Equivalent SeString.</returns>
|
/// <returns>Equivalent SeString.</returns>
|
||||||
public static implicit operator SeString(string str) => new(new TextPayload(str));
|
public static implicit operator SeString(string str) => new(new TextPayload(str));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Implicitly convert a string into a SeString containing a <see cref="TextPayload"/>.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="str">string to convert.</param>
|
|
||||||
/// <returns>Equivalent SeString.</returns>
|
|
||||||
[Obsolete("Switch to using ReadOnlySeString instead of Lumina's SeString.", true)]
|
|
||||||
public static explicit operator SeString(Lumina.Text.SeString str) => str.ToDalamudString();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parse a binary game message into an SeString.
|
/// Parse a binary game message into an SeString.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -908,7 +908,7 @@ public abstract class Window
|
||||||
private void DrawErrorMessage()
|
private void DrawErrorMessage()
|
||||||
{
|
{
|
||||||
// TODO: Once window systems are services, offer to reload the plugin
|
// TODO: Once window systems are services, offer to reload the plugin
|
||||||
ImGui.TextColoredWrapped(ImGuiColors.DalamudRed,Loc.Localize("WindowSystemErrorOccurred", "An error occurred while rendering this window. Please contact the developer for details."));
|
ImGui.TextColoredWrapped(ImGuiColors.DalamudRed, Loc.Localize("WindowSystemErrorOccurred", "An error occurred while rendering this window. Please contact the developer for details."));
|
||||||
|
|
||||||
ImGuiHelpers.ScaledDummy(5);
|
ImGuiHelpers.ScaledDummy(5);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,16 +158,6 @@ public static partial class Util
|
||||||
return branchInternal = gitBranch;
|
return branchInternal = gitBranch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the active Dalamud track, if this instance was launched through XIVLauncher and used a version
|
|
||||||
/// downloaded from webservices.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>The name of the track, or null.</returns>
|
|
||||||
internal static string? GetActiveTrack()
|
|
||||||
{
|
|
||||||
return Environment.GetEnvironmentVariable("DALAMUD_BRANCH");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc cref="DescribeAddress(nint)"/>
|
/// <inheritdoc cref="DescribeAddress(nint)"/>
|
||||||
public static unsafe string DescribeAddress(void* p) => DescribeAddress((nint)p);
|
public static unsafe string DescribeAddress(void* p) => DescribeAddress((nint)p);
|
||||||
|
|
||||||
|
|
@ -703,6 +693,16 @@ public static partial class Util
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the active Dalamud track, if this instance was launched through XIVLauncher and used a version
|
||||||
|
/// downloaded from webservices.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The name of the track, or null.</returns>
|
||||||
|
internal static string? GetActiveTrack()
|
||||||
|
{
|
||||||
|
return Environment.GetEnvironmentVariable("DALAMUD_BRANCH");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a random, inoffensive, human-friendly string.
|
/// Gets a random, inoffensive, human-friendly string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue