mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-23 22:33:41 +00:00
Improved TopoSort determinism
This commit is contained in:
parent
461594bb83
commit
546e8b5fe7
5 changed files with 16 additions and 14 deletions
|
@ -216,7 +216,7 @@ namespace RTLIL
|
|||
// set has an influence on the algorithm.
|
||||
|
||||
template<typename T> struct compare_ptr_by_name {
|
||||
bool operator()(const T *a, const T *b) {
|
||||
bool operator()(const T *a, const T *b) const {
|
||||
return (a == nullptr || b == nullptr) ? (a < b) : (a->name < b->name);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue