mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-03 03:47:42 +00:00
refactor: Remove pragma warning for floating point equality in TBar struct; update .editorconfig to suppress SonarQube S1244
This commit is contained in:
@@ -67,7 +67,6 @@ public readonly struct TBar : IEquatable<TBar>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public override string ToString() => $"[{AsDateTime:yyyy-MM-dd HH:mm:ss}: O={Open:F2}, H={High:F2}, L={Low:F2}, C={Close:F2}, V={Volume:F2}]";
|
||||
|
||||
#pragma warning disable S1244 // Floating point equality is intentional for exact struct comparison
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool Equals(TBar other) =>
|
||||
Time == other.Time &&
|
||||
@@ -81,5 +80,4 @@ public readonly struct TBar : IEquatable<TBar>
|
||||
public override int GetHashCode() => HashCode.Combine(Time, Open, High, Low, Close, Volume);
|
||||
public static bool operator ==(TBar left, TBar right) => left.Equals(right);
|
||||
public static bool operator !=(TBar left, TBar right) => !left.Equals(right);
|
||||
#pragma warning restore S1244
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user