mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-30 07:53:16 +00:00
substr() -> compare()
This commit is contained in:
parent
71eff6f0de
commit
6d77236f38
31 changed files with 127 additions and 127 deletions
|
@ -215,9 +215,9 @@ struct EquivStructWorker
|
|||
if (c != nullptr) {
|
||||
string n = cell_name.str();
|
||||
cells_type = c->type;
|
||||
if (GetSize(n) > 5 && n.substr(GetSize(n)-5) == "_gold")
|
||||
if (GetSize(n) > 5 && n.compare(GetSize(n)-5, std::string::npos, "_gold") == 0)
|
||||
gold_cells.push_back(c);
|
||||
else if (GetSize(n) > 5 && n.substr(GetSize(n)-5) == "_gate")
|
||||
else if (GetSize(n) > 5 && n.compare(GetSize(n)-5, std::string::npos, "_gate") == 0)
|
||||
gate_cells.push_back(c);
|
||||
else
|
||||
other_cells.push_back(c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue