Report json fixes (#181)
* Move "No paths found." reporting * delete ends * Smallfix
This commit is contained in:
parent
068183a49f
commit
aaa9d2d377
|
|
@ -335,7 +335,7 @@ void
|
|||
ReportPath::reportPathEnds(PathEndSeq *ends)
|
||||
{
|
||||
reportPathEndHeader();
|
||||
if (ends) {
|
||||
if (ends && !ends->empty()) {
|
||||
PathEndSeq::Iterator end_iter(ends);
|
||||
PathEnd *prev_end = nullptr;
|
||||
while (end_iter.hasNext()) {
|
||||
|
|
@ -344,6 +344,10 @@ ReportPath::reportPathEnds(PathEndSeq *ends)
|
|||
prev_end = end;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (format_ != ReportPathFormat::json)
|
||||
report_->reportLine("No paths found.");
|
||||
}
|
||||
reportPathEndFooter();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -512,13 +512,8 @@ report_path_cmd(PathRef *path)
|
|||
void
|
||||
report_path_ends(PathEndSeq *ends)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
Report *report = sta->report();
|
||||
ReportPathFormat path_format = sta->reportPath()->pathFormat();
|
||||
if (path_format == ReportPathFormat::json || (ends && ends->size() > 0))
|
||||
sta->reportPathEnds(ends);
|
||||
else
|
||||
report->reportLine("No paths found.");
|
||||
Sta::sta()->reportPathEnds(ends);
|
||||
delete ends;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue