Skip to content

Commit 9b2bdf8

Browse files
committed
PathGroup::name std::string
Signed-off-by: James Cherry <cherry@parallaxsw.com>
1 parent 28b9401 commit 9b2bdf8

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

include/sta/PathGroup.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public:
6666
float min_slack,
6767
float max_slack,
6868
const StaState *sta);
69-
const char *name() const { return name_.c_str(); }
69+
const std::string &name() const { return name_; }
7070
const MinMax *minMax() const { return min_max_;}
7171
const PathEndSeq &pathEnds() const { return path_ends_; }
7272
void insert(PathEnd *path_end);

search/ReportPath.cc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ ReportPath::reportEndpointHeader(const PathEnd *end,
406406
: "max_delay/setup";
407407
report_->reportLine("%s group %s",
408408
setup_hold,
409-
group->name());
409+
group->name().c_str());
410410
reportBlankLine();
411411
reportEndHeader();
412412
}
@@ -1079,11 +1079,17 @@ ReportPath::reportJson(const PathEnd *end,
10791079
{
10801080
std::string result;
10811081
result += "{\n";
1082-
stringAppend(result, " \"type\": \"%s\",\n", end->typeName());
1083-
stringAppend(result, " \"path_group\": \"%s\",\n",
1084-
end->pathGroup()->name());
1085-
stringAppend(result, " \"path_type\": \"%s\",\n",
1086-
end->minMax(this)->to_string().c_str());
1082+
result += " \"type\": \"";
1083+
result += end->typeName();
1084+
result += "\",\n";
1085+
1086+
result += " \"path_group\": \"";
1087+
result += end->pathGroup()->name();
1088+
result += "\",\n";
1089+
1090+
result += " \"path_type\": \"";
1091+
result += end->minMax(this)->to_string();
1092+
result += "\",\n";
10871093

10881094
PathExpanded expanded(end->path(), this);
10891095
const Pin *startpoint = expanded.startPath()->vertex(this)->pin();
@@ -1269,7 +1275,7 @@ ReportPath::reportSlackOnly(const PathEnd *end) const
12691275
{
12701276
std::string line;
12711277
const EarlyLate *early_late = end->pathEarlyLate(this);
1272-
reportDescription(end->pathGroup()->name(), line);
1278+
reportDescription(end->pathGroup()->name().c_str(), line);
12731279
if (end->isUnconstrained())
12741280
reportSpaceFieldDelay(end->dataArrivalTimeOffset(this), early_late, line);
12751281
else

0 commit comments

Comments
 (0)