Skip to content

Commit 23a4c32

Browse files
committed
clang-format various clang-tidy changes
Signed-off-by: Matt Liberty <[email protected]>
1 parent 215c38b commit 23a4c32

21 files changed

+50
-96
lines changed

src/drt/src/gr/FlexGRGridGraph_maze.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ frCost FlexGRGridGraph::getEstCost(const FlexMazeIdx& src,
9191
getPoint(src.x(), src.y(), srcPoint);
9292
getPoint(dstMazeIdx1.x(), dstMazeIdx1.y(), dstPoint1);
9393
getPoint(dstMazeIdx2.x(), dstMazeIdx2.y(), dstPoint2);
94-
frCoord minCostX = std::max({
95-
dstPoint1.x() - srcPoint.x(), srcPoint.x() - dstPoint2.x(), 0});
96-
frCoord minCostY = std::max({
97-
dstPoint1.y() - srcPoint.y(), srcPoint.y() - dstPoint2.y(), 0});
94+
frCoord minCostX = std::max(
95+
{dstPoint1.x() - srcPoint.x(), srcPoint.x() - dstPoint2.x(), 0});
96+
frCoord minCostY = std::max(
97+
{dstPoint1.y() - srcPoint.y(), srcPoint.y() - dstPoint2.y(), 0});
9898
frCoord minCostZ
99-
= std::max({getZHeight(dstMazeIdx1.z()) - getZHeight(src.z()),
100-
getZHeight(src.z()) - getZHeight(dstMazeIdx2.z()),
101-
0});
99+
= std::max({getZHeight(dstMazeIdx1.z()) - getZHeight(src.z()),
100+
getZHeight(src.z()) - getZHeight(dstMazeIdx2.z()),
101+
0});
102102

103103
bendCnt += (minCostX && dir != frDirEnum::UNKNOWN && dir != frDirEnum::E
104104
&& dir != frDirEnum::W)

src/gpl/src/nesterovBase.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,8 +2723,10 @@ void NesterovBase::updateGradients(std::vector<FloatPoint>& sumGrads,
27232723
wireLengthPreCondi.x + (densityPenalty_ * densityPrecondi.x),
27242724
wireLengthPreCondi.y + (densityPenalty_ * densityPrecondi.y));
27252725

2726-
sumPrecondi.x = std::max(sumPrecondi.x, NesterovPlaceVars::minPreconditioner);
2727-
sumPrecondi.y = std::max(sumPrecondi.y, NesterovPlaceVars::minPreconditioner);
2726+
sumPrecondi.x
2727+
= std::max(sumPrecondi.x, NesterovPlaceVars::minPreconditioner);
2728+
sumPrecondi.y
2729+
= std::max(sumPrecondi.y, NesterovPlaceVars::minPreconditioner);
27282730

27292731
sumGrads[i].x /= sumPrecondi.x;
27302732
sumGrads[i].y /= sumPrecondi.y;

src/gpl/src/nesterovPlace.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,8 @@ void NesterovPlace::doBackTracking(const float coeff)
887887
{
888888
// Back-Tracking loop
889889
int numBackTrak = 0;
890-
for (numBackTrak = 0; numBackTrak < NesterovPlaceVars::maxBackTrack; numBackTrak++) {
890+
for (numBackTrak = 0; numBackTrak < NesterovPlaceVars::maxBackTrack;
891+
numBackTrak++) {
891892
// fill in nextCoordinates with given stepLength_
892893
for (auto& nb : nbVec_) {
893894
nb->nesterovUpdateCoordinates(coeff);

src/grt/src/cugr/src/robin_hood.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,7 @@ constexpr bool operator!=(pair<A, B> const& x, pair<A, B> const& y)
773773
return !(x == y);
774774
}
775775
template <typename A, typename B>
776-
constexpr bool
777-
operator<(pair<A, B> const& x, pair<A, B> const& y) noexcept(
776+
constexpr bool operator<(pair<A, B> const& x, pair<A, B> const& y) noexcept(
778777
noexcept(std::declval<A const&>() < std::declval<A const&>())
779778
&& noexcept(std::declval<B const&>() < std::declval<B const&>()))
780779
{

src/gui/src/bufferTreeDescriptor.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -278,21 +278,21 @@ Descriptor::Actions BufferTreeDescriptor::getActions(
278278
has_net_tracks |= !net->getTracks().empty();
279279
}
280280
if (has_net_tracks) {
281-
actions.push_back(
282-
Descriptor::Action{"Tracks", [this, gui, &bnet]() {
283-
bool tracks_on = false;
284-
for (auto* net : bnet.getNets()) {
285-
tracks_on |= tracks_nets_.contains(net);
286-
}
287-
for (auto* net : bnet.getNets()) {
288-
if (!tracks_on) {
289-
gui->addNetTracks(net);
290-
} else {
291-
gui->removeNetTracks(net);
292-
}
293-
}
294-
return makeSelected(bnet);
295-
}});
281+
actions.push_back(Descriptor::Action{"Tracks", [this, gui, &bnet]() {
282+
bool tracks_on = false;
283+
for (auto* net : bnet.getNets()) {
284+
tracks_on
285+
|= tracks_nets_.contains(net);
286+
}
287+
for (auto* net : bnet.getNets()) {
288+
if (!tracks_on) {
289+
gui->addNetTracks(net);
290+
} else {
291+
gui->removeNetTracks(net);
292+
}
293+
}
294+
return makeSelected(bnet);
295+
}});
296296
}
297297
return actions;
298298
}

src/gui/src/clockWidget.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ class ClockNetGraphicsViewItem : public QGraphicsItem
122122
void buildTrunkJunction(const std::vector<ClockNodeGraphicsViewItem*>& nodes,
123123
bool top_anchor,
124124
const QPointF& trunk_junction);
125-
void addLeafPath(const QPointF& start,
126-
qreal y_trunk,
127-
const QPointF& end);
125+
void addLeafPath(const QPointF& start, qreal y_trunk, const QPointF& end);
128126

129127
void setNetInformation();
130128
};

src/gui/src/tclCmdHighlighter.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ class TclCmdHighlighter : public QSyntaxHighlighter
8888
const std::string& start_of_command,
8989
const std::string& end_of_command);
9090
static CommandRulePtr buildRule(const std::string& pattern);
91-
static CommandRulePtr buildRule(int command_id,
92-
const std::string& pattern);
91+
static CommandRulePtr buildRule(int command_id, const std::string& pattern);
9392
static ArgumentRulePtr buildArgumentRule(const std::vector<std::string>& args,
9493
const QTextCharFormat* format);
9594

src/odb/src/def/def/defiComponent.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ class defiComponent
8787
void setEEQ(const char* name);
8888
void addNet(const char* netName);
8989
void addProperty(const char* name, const char* value, char type);
90-
void addNumProperty(const char* name,
91-
double d,
92-
const char* value,
93-
char type);
90+
void addNumProperty(const char* name, double d, const char* value, char type);
9491
void reverseNetOrder();
9592
void setWeight(int w);
9693
void setMaskShift(const char* color);

src/odb/src/def/def/defiGroup.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ class defiGroup
5353

5454
void setup(const char* name);
5555
void addProperty(const char* name, const char* value, char type);
56-
void addNumProperty(const char* name,
57-
double d,
58-
const char* value,
59-
char type);
56+
void addNumProperty(const char* name, double d, const char* value, char type);
6057
void addRegionRect(int xl, int yl, int xh, int yh);
6158
void setRegionName(const char* name);
6259
void setMaxX(int x);

src/odb/src/def/def/defiNet.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,7 @@ class defiNet
251251
void setType(const char* typ); // Either FIXED COVER ROUTED
252252

253253
void addProp(const char* name, const char* value, char type);
254-
void addNumProp(const char* name,
255-
double d,
256-
const char* value,
257-
char type);
254+
void addNumProp(const char* name, double d, const char* value, char type);
258255
void addSubnet(defiSubnet* subnet);
259256
// NEW: a net can have more than 1 wire
260257
void addWire(const char* typ, const char* wireShieldName);

0 commit comments

Comments
 (0)