Skip to content

Commit 86e3aa1

Browse files
committed
pad: apply clang-tidy suggestion
Signed-off-by: Peter Gadfort <[email protected]>
1 parent 3edffbd commit 86e3aa1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pad/src/PadPlacer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,8 @@ void UniformPadPlacer::place()
413413
= static_cast<float>(getRowWidth() - getTotalInstWidths())
414414
/ (getInsts().size() + 1);
415415
if (max_spacing_) {
416-
if (*max_spacing_ < initial_target_spacing) {
417-
initial_target_spacing = *max_spacing_;
418-
}
416+
initial_target_spacing
417+
= std::min<float>(*max_spacing_, initial_target_spacing);
419418
}
420419
const int site_width = std::min(getRow()->getSite()->getWidth(),
421420
getRow()->getSite()->getHeight());

0 commit comments

Comments
 (0)