mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
Fix IDE0007: Use 'var' instead of explicit type
This commit is contained in:
parent
a32c0f07ea
commit
ff751e50ac
6 changed files with 7 additions and 7 deletions
|
|
@ -89,7 +89,7 @@ public readonly unsafe struct AtkValuePtr(nint address) : IEquatable<AtkValuePtr
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public unsafe bool TryGet<T>([NotNullWhen(true)] out T? result) where T : struct
|
public unsafe bool TryGet<T>([NotNullWhen(true)] out T? result) where T : struct
|
||||||
{
|
{
|
||||||
object? value = this.GetValue();
|
var value = this.GetValue();
|
||||||
if (value is T typed)
|
if (value is T typed)
|
||||||
{
|
{
|
||||||
result = typed;
|
result = typed;
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
|
||||||
reader.ReadByte();
|
reader.ReadByte();
|
||||||
|
|
||||||
// if the next byte is 0xF3 then this listing is limited to home world
|
// if the next byte is 0xF3 then this listing is limited to home world
|
||||||
byte nextByte = reader.ReadByte();
|
var nextByte = reader.ReadByte();
|
||||||
switch (nextByte)
|
switch (nextByte)
|
||||||
{
|
{
|
||||||
case (byte)PartyFinderLinkType.LimitedToHomeWorld:
|
case (byte)PartyFinderLinkType.LimitedToHomeWorld:
|
||||||
|
|
@ -125,7 +125,7 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
|
||||||
|
|
||||||
// back to our regularly scheduled programming...
|
// back to our regularly scheduled programming...
|
||||||
var listingIDBytes = MakeInteger(this.ListingId);
|
var listingIDBytes = MakeInteger(this.ListingId);
|
||||||
bool isFlagSpecified = this.LinkType != PartyFinderLinkType.NotSpecified;
|
var isFlagSpecified = this.LinkType != PartyFinderLinkType.NotSpecified;
|
||||||
|
|
||||||
var chunkLen = listingIDBytes.Length + 4;
|
var chunkLen = listingIDBytes.Length + 4;
|
||||||
// 1 more byte for the type flag if it is specified
|
// 1 more byte for the type flag if it is specified
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public partial class FileDialog
|
||||||
windowVisible = ImGui.Begin(name, ref this.visible, this.WindowFlags);
|
windowVisible = ImGui.Begin(name, ref this.visible, this.WindowFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wasClosed = false;
|
var wasClosed = false;
|
||||||
if (windowVisible)
|
if (windowVisible)
|
||||||
{
|
{
|
||||||
if (!this.visible)
|
if (!this.visible)
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ public class ProfilerWindow : Window
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint eventTextDepth = maxRectDept + 2;
|
var eventTextDepth = maxRectDept + 2;
|
||||||
|
|
||||||
var eventsXPos = new List<float>();
|
var eventsXPos = new List<float>();
|
||||||
const float eventsXPosFudge = 5f;
|
const float eventsXPosFudge = 5f;
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ internal class PluginErrorHandler : IServiceType
|
||||||
|
|
||||||
// Create expressions to convert array elements to parameter types
|
// Create expressions to convert array elements to parameter types
|
||||||
var callArgs = new Expression[parameters.Length];
|
var callArgs = new Expression[parameters.Length];
|
||||||
for (int i = 0; i < parameters.Length; i++)
|
for (var i = 0; i < parameters.Length; i++)
|
||||||
{
|
{
|
||||||
var paramType = parameters[i].ParameterType;
|
var paramType = parameters[i].ParameterType;
|
||||||
var arrayAccess = Expression.ArrayIndex(argsParam, Expression.Constant(i));
|
var arrayAccess = Expression.ArrayIndex(argsParam, Expression.Constant(i));
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public static class Timings
|
||||||
var outerTimingHandle = TaskTimingHandles;
|
var outerTimingHandle = TaskTimingHandles;
|
||||||
return () =>
|
return () =>
|
||||||
{
|
{
|
||||||
T res = default(T);
|
var res = default(T);
|
||||||
var prev = TaskTimingHandles;
|
var prev = TaskTimingHandles;
|
||||||
TaskTimingHandles = outerTimingHandle;
|
TaskTimingHandles = outerTimingHandle;
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue