Skip to content

Commit

Permalink
Remove extra calls to min and max
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-upadhyay committed Jan 31, 2024
1 parent 3a1d351 commit baca219
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ public Row(String name, int minTemp, int maxTemp, int count, int sum, long hash)
}

void update(int temperature) {
this.minTemp = min(this.minTemp, temperature);
this.maxTemp = max(this.maxTemp, temperature);

this.count++;
this.sum += temperature;
if (temperature < minTemp) {
Expand Down

0 comments on commit baca219

Please sign in to comment.