Skip to content

Commit 3ebe3d2

Browse files
committed
drt: requested clang-tidy changes
Signed-off-by: osamahammad21 <osama21@aucegypt.edu>
1 parent fe6efde commit 3ebe3d2

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

src/drt/src/db/tech/frLayer.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -623,12 +623,14 @@ class frLayer
623623
{
624624
// This vector should be sorted by area in a descending order
625625
auto area = in->getODBRule()->getArea();
626-
auto it = std::lower_bound(lef58AreaConstraints_.begin(),
627-
lef58AreaConstraints_.end(),
628-
area,
629-
[](const frLef58AreaConstraint* a, frCoord b) {
630-
return a->getODBRule()->getArea() > b;
631-
});
626+
auto it = std::ranges::lower_bound(
627+
lef58AreaConstraints_.begin(),
628+
lef58AreaConstraints_.end(),
629+
area,
630+
std::ranges::greater{},
631+
[](const frLef58AreaConstraint* a) {
632+
return a->getODBRule()->getArea();
633+
});
632634
lef58AreaConstraints_.insert(it, in);
633635
}
634636

@@ -647,12 +649,14 @@ class frLayer
647649
{
648650
// This vector should be sorted by rectwidth in an ascending order
649651
auto rectwidth = in->getODBRule()->getRectWidth();
650-
auto it = std::lower_bound(lef58AreaConstraintsRectWidth_.begin(),
651-
lef58AreaConstraintsRectWidth_.end(),
652-
rectwidth,
653-
[](const frLef58AreaConstraint* a, frCoord b) {
654-
return a->getODBRule()->getRectWidth() < b;
655-
});
652+
auto it = std::ranges::lower_bound(
653+
lef58AreaConstraintsRectWidth_.begin(),
654+
lef58AreaConstraintsRectWidth_.end(),
655+
rectwidth,
656+
std::ranges::less{},
657+
[](const frLef58AreaConstraint* a) {
658+
return a->getODBRule()->getRectWidth();
659+
});
656660
lef58AreaConstraintsRectWidth_.insert(it, in);
657661
}
658662

src/drt/src/gc/FlexGC_main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "frProfileTask.h"
2626
#include "gc/FlexGC.h"
2727
#include "gc/FlexGC_impl.h"
28+
#include "odb/db.h"
2829
#include "odb/dbTypes.h"
2930
#include "odb/geom.h"
3031
#include "odb/isotropy.h"

0 commit comments

Comments
 (0)