Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Efnilite <[email protected]>
  • Loading branch information
sovdeeth and Efnilite authored Nov 10, 2024
1 parent 771b09a commit a644f25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class DefaultOperations {
long result = left.longValue() + right.longValue();
// catches overflow, from Math.addExact(long, long)
if (((left.longValue() ^ result) & (right.longValue() ^ result)) >= 0)
return (result);
return result;
}
return left.doubleValue() + right.doubleValue();
});
Expand All @@ -45,7 +45,7 @@ public class DefaultOperations {
long result = left.longValue() - right.longValue();
// catches overflow, from Math.addExact(long, long)
if (((left.longValue() ^ result) & (right.longValue() ^ result)) >= 0)
return (result);
return result;
}
return left.doubleValue() - right.doubleValue();
});
Expand Down

0 comments on commit a644f25

Please sign in to comment.