mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Fix CA1859: Use concrete types when possible for improved performance
This commit is contained in:
parent
7d94098ba3
commit
1d8bd96e86
5 changed files with 7 additions and 8 deletions
|
|
@ -33,7 +33,7 @@ namespace Dalamud.Game.Network.Internal;
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal unsafe class NetworkHandlers : IInternalDisposableService
|
internal unsafe class NetworkHandlers : IInternalDisposableService
|
||||||
{
|
{
|
||||||
private readonly IMarketBoardUploader uploader;
|
private readonly UniversalisMarketBoardUploader uploader;
|
||||||
|
|
||||||
private readonly IDisposable handleMarketBoardItemRequest;
|
private readonly IDisposable handleMarketBoardItemRequest;
|
||||||
private readonly IDisposable handleMarketTaxRates;
|
private readonly IDisposable handleMarketTaxRates;
|
||||||
|
|
@ -448,7 +448,7 @@ internal unsafe class NetworkHandlers : IInternalDisposableService
|
||||||
private void UploadMarketBoardData(
|
private void UploadMarketBoardData(
|
||||||
MarketBoardItemRequest request,
|
MarketBoardItemRequest request,
|
||||||
(uint CatalogId, ICollection<MarketBoardHistory.MarketBoardHistoryListing> Sales) sales,
|
(uint CatalogId, ICollection<MarketBoardHistory.MarketBoardHistoryListing> Sales) sales,
|
||||||
ICollection<MarketBoardCurrentOfferings.MarketBoardItemListing> listings,
|
List<MarketBoardCurrentOfferings.MarketBoardItemListing> listings,
|
||||||
ulong uploaderId,
|
ulong uploaderId,
|
||||||
uint worldId)
|
uint worldId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -213,11 +213,10 @@ public abstract partial class Payload
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Payload DecodeText(BinaryReader reader)
|
private static TextPayload DecodeText(BinaryReader reader)
|
||||||
{
|
{
|
||||||
var payload = new TextPayload();
|
var payload = new TextPayload();
|
||||||
payload.DecodeImpl(reader, reader.BaseStream.Length);
|
payload.DecodeImpl(reader, reader.BaseStream.Length);
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ public sealed class SystemFontFamilyId : IFontFamilyId
|
||||||
return new(IObjectWithLocalizableName.GetLocaleNames(fn));
|
return new(IObjectWithLocalizableName.GetLocaleNames(fn));
|
||||||
}
|
}
|
||||||
|
|
||||||
private unsafe IReadOnlyList<IFontId> GetFonts()
|
private unsafe List<IFontId> GetFonts()
|
||||||
{
|
{
|
||||||
using var dwf = default(ComPtr<IDWriteFactory>);
|
using var dwf = default(ComPtr<IDWriteFactory>);
|
||||||
fixed (Guid* piid = &IID.IID_IDWriteFactory)
|
fixed (Guid* piid = &IID.IID_IDWriteFactory)
|
||||||
|
|
|
||||||
|
|
@ -1235,7 +1235,7 @@ public sealed class SingleFontChooserDialog : IDisposable
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSelectedFamilyAndFontIndices(
|
private void UpdateSelectedFamilyAndFontIndices(
|
||||||
IReadOnlyList<IFontFamilyId> fonts,
|
List<IFontFamilyId> fonts,
|
||||||
string familyName,
|
string familyName,
|
||||||
string fontName)
|
string fontName)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -193,8 +193,8 @@ public static partial class ImRaii
|
||||||
return new EndUnconditionally(Restore, true);
|
return new EndUnconditionally(Restore, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEndObject DisabledEnd()
|
private static EndUnconditionally DisabledEnd()
|
||||||
=> new EndUnconditionally(() =>
|
=> new(() =>
|
||||||
{
|
{
|
||||||
--disabledCount;
|
--disabledCount;
|
||||||
ImGui.EndDisabled();
|
ImGui.EndDisabled();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue