Skip to content

Commit

Permalink
PR feedback take 3
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Dec 13, 2024
1 parent c435fb2 commit 0bdf0ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Lucene.Net/Support/Threading/AtomicDouble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,11 @@ public static implicit operator double(AtomicDouble atomicInt64)
public static bool operator ==(AtomicDouble? a1, double? a2)
{
if (a1 is null)
return !a2.HasValue;
return a2 is null;
if (a2 is null)
return false;

return a1.Value.Equals(a2.GetValueOrDefault());
return a1.Value.Equals(a2.Value);
}

/// <summary>
Expand Down

0 comments on commit 0bdf0ff

Please sign in to comment.