mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix warnings
This commit is contained in:
parent
148de97331
commit
ec122c85d5
10 changed files with 17 additions and 60 deletions
|
|
@ -54,8 +54,6 @@ internal class PluginImageCache : IInternalDisposableService
|
||||||
private readonly CancellationTokenSource cancelToken = new();
|
private readonly CancellationTokenSource cancelToken = new();
|
||||||
private readonly Task downloadTask;
|
private readonly Task downloadTask;
|
||||||
private readonly Task loadTask;
|
private readonly Task loadTask;
|
||||||
|
|
||||||
private record LoadedIcon(IDalamudTextureWrap Texture, DateTime LoadedSince);
|
|
||||||
|
|
||||||
private readonly ConcurrentDictionary<string, LoadedIcon?> pluginIconMap = new();
|
private readonly ConcurrentDictionary<string, LoadedIcon?> pluginIconMap = new();
|
||||||
private readonly ConcurrentDictionary<string, IDalamudTextureWrap?[]?> pluginImagesMap = new();
|
private readonly ConcurrentDictionary<string, IDalamudTextureWrap?[]?> pluginImagesMap = new();
|
||||||
|
|
@ -701,4 +699,11 @@ internal class PluginImageCache : IInternalDisposableService
|
||||||
|
|
||||||
return output;
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ internal class ContextMenuAgingStep : IAgingStep
|
||||||
|
|
||||||
private void OnMenuOpened(MenuOpenedArgs args)
|
private void OnMenuOpened(MenuOpenedArgs args)
|
||||||
{
|
{
|
||||||
LogMenuOpened(args);
|
this.LogMenuOpened(args);
|
||||||
|
|
||||||
switch (this.currentSubStep)
|
switch (this.currentSubStep)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -132,7 +133,7 @@ internal class ServiceContainer : IServiceProvider, IServiceType
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var instance = FormatterServices.GetUninitializedObject(objectType);
|
var instance = RuntimeHelpers.GetUninitializedObject(objectType);
|
||||||
|
|
||||||
if (!await this.InjectProperties(instance, scopedObjects, scope))
|
if (!await this.InjectProperties(instance, scopedObjects, scope))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,4 @@ public class MemoryAllocationException : MemoryException
|
||||||
: base(message, innerException)
|
: 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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,4 @@ public abstract class MemoryException : Exception
|
||||||
: base(message, innerException)
|
: 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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,4 @@ public class MemoryPermissionException : MemoryException
|
||||||
: base(message, innerException)
|
: 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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,4 @@ public class MemoryReadException : MemoryException
|
||||||
: base(message, innerException)
|
: 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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,4 @@ public class MemoryWriteException : MemoryException
|
||||||
: base(message, innerException)
|
: 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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ internal partial class PluginManager : IInternalDisposableService
|
||||||
this.MainRepo = PluginRepository.CreateMainRepo(this.happyHttpClient);
|
this.MainRepo = PluginRepository.CreateMainRepo(this.happyHttpClient);
|
||||||
|
|
||||||
// NET8 CHORE
|
// NET8 CHORE
|
||||||
//this.ApplyPatches();
|
// this.ApplyPatches();
|
||||||
|
|
||||||
registerStartupBlocker(
|
registerStartupBlocker(
|
||||||
Task.Run(this.LoadAndStartLoadSyncPlugins),
|
Task.Run(this.LoadAndStartLoadSyncPlugins),
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,9 @@ namespace Dalamud.Utility
|
||||||
this.firstIndex = 0;
|
this.firstIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // value < this._size
|
else
|
||||||
{
|
{
|
||||||
|
// value < this._size
|
||||||
ThrowHelper.ThrowArgumentOutOfRangeExceptionIfLessThan(nameof(value), value, 0);
|
ThrowHelper.ThrowArgumentOutOfRangeExceptionIfLessThan(nameof(value), value, 0);
|
||||||
if (value < this.Count)
|
if (value < this.Count)
|
||||||
{
|
{
|
||||||
|
|
@ -156,14 +157,14 @@ namespace Dalamud.Utility
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Add items to this <see cref="RollingList{T}"/>.</summary>
|
/// <summary>Add items to this <see cref="RollingList{T}"/>.</summary>
|
||||||
/// <param name="items">Items to add.</param>
|
/// <param name="range">Items to add.</param>
|
||||||
public void AddRange(IEnumerable<T> items)
|
public void AddRange(IEnumerable<T> range)
|
||||||
{
|
{
|
||||||
if (this.size == 0) return;
|
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()
|
public void Clear()
|
||||||
{
|
{
|
||||||
this.items.Clear();
|
this.items.Clear();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue