mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +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>
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue