diff --git a/include/sta/PathGroup.hh b/include/sta/PathGroup.hh index 4d6d90dd..58bb84d9 100644 --- a/include/sta/PathGroup.hh +++ b/include/sta/PathGroup.hh @@ -66,7 +66,7 @@ public: float min_slack, float max_slack, const StaState *sta); - const char *name() const { return name_.c_str(); } + const std::string &name() const { return name_; } const MinMax *minMax() const { return min_max_;} const PathEndSeq &pathEnds() const { return path_ends_; } void insert(PathEnd *path_end); diff --git a/search/ReportPath.cc b/search/ReportPath.cc index 33fb3689..bf6d83fe 100644 --- a/search/ReportPath.cc +++ b/search/ReportPath.cc @@ -406,7 +406,7 @@ ReportPath::reportEndpointHeader(const PathEnd *end, : "max_delay/setup"; report_->reportLine("%s group %s", setup_hold, - group->name()); + group->name().c_str()); reportBlankLine(); reportEndHeader(); } @@ -1079,11 +1079,17 @@ ReportPath::reportJson(const PathEnd *end, { std::string result; result += "{\n"; - stringAppend(result, " \"type\": \"%s\",\n", end->typeName()); - stringAppend(result, " \"path_group\": \"%s\",\n", - end->pathGroup()->name()); - stringAppend(result, " \"path_type\": \"%s\",\n", - end->minMax(this)->to_string().c_str()); + result += " \"type\": \""; + result += end->typeName(); + result += "\",\n"; + + result += " \"path_group\": \""; + result += end->pathGroup()->name(); + result += "\",\n"; + + result += " \"path_type\": \""; + result += end->minMax(this)->to_string(); + result += "\",\n"; PathExpanded expanded(end->path(), this); const Pin *startpoint = expanded.startPath()->vertex(this)->pin(); @@ -1269,7 +1275,7 @@ ReportPath::reportSlackOnly(const PathEnd *end) const { std::string line; const EarlyLate *early_late = end->pathEarlyLate(this); - reportDescription(end->pathGroup()->name(), line); + reportDescription(end->pathGroup()->name().c_str(), line); if (end->isUnconstrained()) reportSpaceFieldDelay(end->dataArrivalTimeOffset(this), early_late, line); else