Fix IDE0007: Use 'var' instead of explicit type

This commit is contained in:
Haselnussbomber 2025-10-24 03:17:46 +02:00
parent a32c0f07ea
commit ff751e50ac
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
6 changed files with 7 additions and 7 deletions

View file

@ -89,7 +89,7 @@ public readonly unsafe struct AtkValuePtr(nint address) : IEquatable<AtkValuePtr
/// </returns>
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)
{
result = typed;

View file

@ -97,7 +97,7 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
reader.ReadByte();
// if the next byte is 0xF3 then this listing is limited to home world
byte nextByte = reader.ReadByte();
var nextByte = reader.ReadByte();
switch (nextByte)
{
case (byte)PartyFinderLinkType.LimitedToHomeWorld:
@ -125,7 +125,7 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
// back to our regularly scheduled programming...
var listingIDBytes = MakeInteger(this.ListingId);
bool isFlagSpecified = this.LinkType != PartyFinderLinkType.NotSpecified;
var isFlagSpecified = this.LinkType != PartyFinderLinkType.NotSpecified;
var chunkLen = listingIDBytes.Length + 4;
// 1 more byte for the type flag if it is specified

View file

@ -54,7 +54,7 @@ public partial class FileDialog
windowVisible = ImGui.Begin(name, ref this.visible, this.WindowFlags);
}
bool wasClosed = false;
var wasClosed = false;
if (windowVisible)
{
if (!this.visible)

View file

@ -188,7 +188,7 @@ public class ProfilerWindow : Window
}
}
uint eventTextDepth = maxRectDept + 2;
var eventTextDepth = maxRectDept + 2;
var eventsXPos = new List<float>();
const float eventsXPosFudge = 5f;

View file

@ -150,7 +150,7 @@ internal class PluginErrorHandler : IServiceType
// Create expressions to convert array elements to parameter types
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 arrayAccess = Expression.ArrayIndex(argsParam, Expression.Constant(i));

View file

@ -53,7 +53,7 @@ public static class Timings
var outerTimingHandle = TaskTimingHandles;
return () =>
{
T res = default(T);
var res = default(T);
var prev = TaskTimingHandles;
TaskTimingHandles = outerTimingHandle;
try