mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-16 12:57:44 +01:00
Fix CA1860: Avoid using 'Enumerable.Any()' extension method
This commit is contained in:
parent
fe37da1b94
commit
d060db3ca4
10 changed files with 22 additions and 22 deletions
|
|
@ -357,7 +357,7 @@ internal class PluginImageCache : IInternalDisposableService
|
|||
try
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
if (!pendingFuncs.Any())
|
||||
if (pendingFuncs.Count == 0)
|
||||
{
|
||||
if (!this.downloadQueue.TryTake(out var taskTuple, -1, token))
|
||||
return;
|
||||
|
|
@ -373,7 +373,7 @@ internal class PluginImageCache : IInternalDisposableService
|
|||
pendingFuncs = pendingFuncs.OrderBy(x => x.Item1).ToList();
|
||||
|
||||
var item1 = pendingFuncs.Last().Item1;
|
||||
while (pendingFuncs.Any() && pendingFuncs.Last().Item1 == item1)
|
||||
while (pendingFuncs.Count != 0 && pendingFuncs.Last().Item1 == item1)
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
while (runningTasks.Count >= concurrency)
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ internal class PluginStatWindow : Window
|
|||
ImGui.SameLine();
|
||||
ImGuiComponents.TextWithLabel("Total Average", $"{totalAverage:F4}ms", "All average update times added together");
|
||||
ImGui.SameLine();
|
||||
ImGuiComponents.TextWithLabel("Collective Average", $"{(statsHistory.Any() ? totalAverage / statsHistory.Length : 0):F4}ms", "Average of all average update times");
|
||||
ImGuiComponents.TextWithLabel("Collective Average", $"{(statsHistory.Length != 0 ? totalAverage / statsHistory.Length : 0):F4}ms", "Average of all average update times");
|
||||
|
||||
ImGui.InputTextWithHint(
|
||||
"###PluginStatWindow_FrameworkSearch"u8,
|
||||
|
|
@ -230,7 +230,7 @@ internal class PluginStatWindow : Window
|
|||
|
||||
foreach (var handlerHistory in statsHistory)
|
||||
{
|
||||
if (!handlerHistory.Value.Any())
|
||||
if (handlerHistory.Value.Count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue