style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
+11 -3
View File
@@ -38,7 +38,9 @@ public sealed class MonotonicDeque
public MonotonicDeque(int period)
{
if (period <= 0)
{
throw new ArgumentOutOfRangeException(nameof(period), "Period must be greater than 0");
}
_period = period;
_deque = new int[period];
@@ -155,7 +157,10 @@ public sealed class MonotonicDeque
public void RebuildMax(double[] buffer, long currentIndex, int count)
{
Reset();
if (count == 0) return;
if (count == 0)
{
return;
}
long startLogical = currentIndex - count + 1;
for (int i = 0; i < count; i++)
@@ -176,7 +181,10 @@ public sealed class MonotonicDeque
public void RebuildMin(double[] buffer, long currentIndex, int count)
{
Reset();
if (count == 0) return;
if (count == 0)
{
return;
}
long startLogical = currentIndex - count + 1;
for (int i = 0; i < count; i++)
@@ -186,4 +194,4 @@ public sealed class MonotonicDeque
PushMin(logicalIndex, buffer[bufIdx], buffer);
}
}
}
}