mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-08 05:57:43 +00:00
Refactor: Update variable declarations for consistency and clarity across multiple files
This commit is contained in:
@@ -372,7 +372,7 @@ public class RingBufferTests
|
||||
buffer.Add(20.0);
|
||||
buffer.Add(30.0);
|
||||
|
||||
var values = new List<double>();
|
||||
List<double> values = [];
|
||||
foreach (var v in buffer)
|
||||
{
|
||||
values.Add(v);
|
||||
@@ -395,7 +395,7 @@ public class RingBufferTests
|
||||
buffer.Add(40.0);
|
||||
buffer.Add(50.0);
|
||||
|
||||
var values = new List<double>();
|
||||
List<double> values = [];
|
||||
foreach (var v in buffer)
|
||||
{
|
||||
values.Add(v);
|
||||
@@ -637,7 +637,7 @@ public class RingBufferTests
|
||||
buffer.Add(20.0);
|
||||
|
||||
IEnumerable<double> enumerable = buffer;
|
||||
var values = new List<double>();
|
||||
List<double> values = [];
|
||||
foreach (var v in enumerable)
|
||||
{
|
||||
values.Add(v);
|
||||
@@ -656,7 +656,7 @@ public class RingBufferTests
|
||||
buffer.Add(20.0);
|
||||
|
||||
IEnumerable enumerable = buffer;
|
||||
var values = new List<double>();
|
||||
List<double> values = [];
|
||||
foreach (var v in enumerable)
|
||||
{
|
||||
values.Add((double)v);
|
||||
|
||||
@@ -526,10 +526,10 @@ public sealed class RingBuffer : IEnumerable<double>
|
||||
_index == other._index &&
|
||||
_current.Equals(other._current);
|
||||
|
||||
public override readonly bool Equals(object? obj) =>
|
||||
public readonly override bool Equals(object? obj) =>
|
||||
obj is Enumerator other && Equals(other);
|
||||
|
||||
public override readonly int GetHashCode() =>
|
||||
public readonly override int GetHashCode() =>
|
||||
HashCode.Combine(RuntimeHelpers.GetHashCode(_buffer), _start, _count, _index, _current);
|
||||
|
||||
public static bool operator ==(Enumerator left, Enumerator right) => left.Equals(right);
|
||||
|
||||
Reference in New Issue
Block a user