We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83efb31 commit ff7176eCopy full SHA for ff7176e
src/dpl/src/infrastructure/Grid.cpp
@@ -835,12 +835,8 @@ void Grid::applyCellContribution(Node* node,
835
}
836
total_area_[pixel_idx] += area_per_pixel;
837
total_pins_[pixel_idx] += pins_per_pixel;
838
- if (total_area_[pixel_idx] < 0.0f) {
839
- total_area_[pixel_idx] = 0.0f;
840
- total_area_[pixel_idx] = std::max(total_area_[pixel_idx], 0.0f);
841
- if (total_pins_[pixel_idx] < 0.0f) {
842
- total_pins_[pixel_idx] = 0.0f;
843
- total_pins_[pixel_idx] = std::max(total_pins_[pixel_idx], 0.0f);
+ total_area_[pixel_idx] = max(total_area_[pixel_idx], 0.0f);
+ total_pins_[pixel_idx] = max(total_pins_[pixel_idx], 0.0f);
844
845
846
0 commit comments