PathEnd::less cmp paths
This commit is contained in:
parent
52c5547e79
commit
a4b9e3969e
|
|
@ -247,13 +247,14 @@ Path::equal(const Path *path1,
|
|||
const Path *path2,
|
||||
const StaState *sta)
|
||||
{
|
||||
return (path1
|
||||
&& path2
|
||||
&& path1->vertexId(sta) == path2->vertexId(sta)
|
||||
// Tag equal implies transition and path ap equal.
|
||||
&& path1->tagIndex(sta) == path2->tagIndex(sta))
|
||||
|| ((path1 == nullptr || path1->isNull())
|
||||
&& (path2 == nullptr || path2->isNull()));
|
||||
bool path1_null = (path1 == nullptr || path1->isNull());
|
||||
bool path2_null = (path2 == nullptr || path2->isNull());
|
||||
return (path1_null && path2_null)
|
||||
|| (!path1_null
|
||||
&& !path2_null
|
||||
&& path1->vertexId(sta) == path2->vertexId(sta)
|
||||
// Tag equal implies transition and path ap equal.
|
||||
&& path1->tagIndex(sta) == path2->tagIndex(sta));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -1962,21 +1962,11 @@ PathEnd::cmp(const PathEnd *path_end1,
|
|||
if (cmp == 0) {
|
||||
cmp = clkEdgeCmp(path_end1->targetClkEdge(sta),
|
||||
path_end2->targetClkEdge(sta));
|
||||
if (cmp == 0) {
|
||||
PathExpanded expanded1(path1, sta);
|
||||
PathExpanded expanded2(path2, sta);
|
||||
const Path *start1 = expanded1.startPath();
|
||||
const Path *start2 = expanded2.startPath();
|
||||
return Path::cmp(start1, start2, sta) < 0;
|
||||
}
|
||||
else
|
||||
return cmp;
|
||||
if (cmp == 0)
|
||||
return Path::cmpAll(path1, path2, sta);
|
||||
}
|
||||
else
|
||||
return cmp;
|
||||
}
|
||||
else
|
||||
return cmp;
|
||||
return cmp;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in New Issue