fix warnings

This commit is contained in:
goaaats 2024-03-19 23:24:23 +01:00
parent 148de97331
commit ec122c85d5
10 changed files with 17 additions and 60 deletions

View file

@ -54,8 +54,6 @@ internal class PluginImageCache : IInternalDisposableService
private readonly CancellationTokenSource cancelToken = new();
private readonly Task downloadTask;
private readonly Task loadTask;
private record LoadedIcon(IDalamudTextureWrap Texture, DateTime LoadedSince);
private readonly ConcurrentDictionary<string, LoadedIcon?> pluginIconMap = new();
private readonly ConcurrentDictionary<string, IDalamudTextureWrap?[]?> pluginImagesMap = new();
@ -701,4 +699,11 @@ internal class PluginImageCache : IInternalDisposableService
return output;
}
/// <summary>
/// Record for a loaded icon.
/// </summary>
/// <param name="Texture">The texture of the icon.</param>
/// <param name="LoadedSince">The time the icon was loaded at.</param>
private record LoadedIcon(IDalamudTextureWrap Texture, DateTime LoadedSince);
}

View file

@ -125,7 +125,7 @@ internal class ContextMenuAgingStep : IAgingStep
private void OnMenuOpened(MenuOpenedArgs args)
{
LogMenuOpened(args);
this.LogMenuOpened(args);
switch (this.currentSubStep)
{

View file

@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Threading.Tasks;
@ -132,7 +133,7 @@ internal class ServiceContainer : IServiceProvider, IServiceType
return null;
}
var instance = FormatterServices.GetUninitializedObject(objectType);
var instance = RuntimeHelpers.GetUninitializedObject(objectType);
if (!await this.InjectProperties(instance, scopedObjects, scope))
{

View file

@ -33,14 +33,4 @@ public class MemoryAllocationException : MemoryException
: base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="MemoryAllocationException"/> class.
/// </summary>
/// <param name="info">The object that holds the serialized data about the exception being thrown.</param>
/// <param name="context">The object that contains contextual information about the source or destination.</param>
protected MemoryAllocationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}

View file

@ -33,14 +33,4 @@ public abstract class MemoryException : Exception
: base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="MemoryException"/> class.
/// </summary>
/// <param name="info">The object that holds the serialized data about the exception being thrown.</param>
/// <param name="context">The object that contains contextual information about the source or destination.</param>
protected MemoryException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}

View file

@ -33,14 +33,4 @@ public class MemoryPermissionException : MemoryException
: base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="MemoryPermissionException"/> class.
/// </summary>
/// <param name="info">The object that holds the serialized data about the exception being thrown.</param>
/// <param name="context">The object that contains contextual information about the source or destination.</param>
protected MemoryPermissionException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}

View file

@ -33,14 +33,4 @@ public class MemoryReadException : MemoryException
: base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="MemoryReadException"/> class.
/// </summary>
/// <param name="info">The object that holds the serialized data about the exception being thrown.</param>
/// <param name="context">The object that contains contextual information about the source or destination.</param>
protected MemoryReadException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}

View file

@ -33,14 +33,4 @@ public class MemoryWriteException : MemoryException
: base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="MemoryWriteException"/> class.
/// </summary>
/// <param name="info">The object that holds the serialized data about the exception being thrown.</param>
/// <param name="context">The object that contains contextual information about the source or destination.</param>
protected MemoryWriteException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}

View file

@ -146,7 +146,7 @@ internal partial class PluginManager : IInternalDisposableService
this.MainRepo = PluginRepository.CreateMainRepo(this.happyHttpClient);
// NET8 CHORE
//this.ApplyPatches();
// this.ApplyPatches();
registerStartupBlocker(
Task.Run(this.LoadAndStartLoadSyncPlugins),

View file

@ -93,8 +93,9 @@ namespace Dalamud.Utility
this.firstIndex = 0;
}
}
else // value < this._size
else
{
// value < this._size
ThrowHelper.ThrowArgumentOutOfRangeExceptionIfLessThan(nameof(value), value, 0);
if (value < this.Count)
{
@ -156,14 +157,14 @@ namespace Dalamud.Utility
}
/// <summary>Add items to this <see cref="RollingList{T}"/>.</summary>
/// <param name="items">Items to add.</param>
public void AddRange(IEnumerable<T> items)
/// <param name="range">Items to add.</param>
public void AddRange(IEnumerable<T> range)
{
if (this.size == 0) return;
foreach (var item in items) this.Add(item);
foreach (var item in range) this.Add(item);
}
/// <summary>Removes all elements from the <see cref="RollingList{T}"/></summary>
/// <summary>Removes all elements from the <see cref="RollingList{T}"/>.</summary>
public void Clear()
{
this.items.Clear();