refactor: consolidate duplicate if (isNew) checks (S2589)

This commit is contained in:
Miha Kralj
2026-01-26 20:17:13 -08:00
parent 13a895b6b6
commit 8ac15f1efa
5 changed files with 17 additions and 37 deletions
+4 -8
View File
@@ -221,20 +221,16 @@ public sealed class Fcb : ITValuePublisher
if (isNew)
{
_p_state = _state;
}
else
{
_state = _p_state;
}
if (isNew)
{
_index++;
if (_count < _period)
{
_count++;
}
}
else
{
_state = _p_state;
}
var (high, low) = GetValid(input.High, input.Low);