mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 23:43:16 +00:00
substr() -> compare()
This commit is contained in:
parent
71eff6f0de
commit
6d77236f38
31 changed files with 127 additions and 127 deletions
|
@ -675,11 +675,11 @@ struct MuxcoverPass : public Pass {
|
|||
for (argidx = 1; argidx < args.size(); argidx++)
|
||||
{
|
||||
const auto &arg = args[argidx];
|
||||
if (arg.size() >= 6 && arg.substr(0,6) == "-mux2=") {
|
||||
if (arg.size() >= 6 && arg.compare(0,6,"-mux2=") == 0) {
|
||||
cost_mux2 = atoi(arg.substr(6).c_str());
|
||||
continue;
|
||||
}
|
||||
if (arg.size() >= 5 && arg.substr(0,5) == "-mux4") {
|
||||
if (arg.size() >= 5 && arg.compare(0,5,"-mux4") == 0) {
|
||||
use_mux4 = true;
|
||||
if (arg.size() > 5) {
|
||||
if (arg[5] != '=') break;
|
||||
|
@ -687,7 +687,7 @@ struct MuxcoverPass : public Pass {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
if (arg.size() >= 5 && arg.substr(0,5) == "-mux8") {
|
||||
if (arg.size() >= 5 && arg.compare(0,5,"-mux8") == 0) {
|
||||
use_mux8 = true;
|
||||
if (arg.size() > 5) {
|
||||
if (arg[5] != '=') break;
|
||||
|
@ -695,7 +695,7 @@ struct MuxcoverPass : public Pass {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
if (arg.size() >= 6 && arg.substr(0,6) == "-mux16") {
|
||||
if (arg.size() >= 6 && arg.compare(0,6,"-mux16") == 0) {
|
||||
use_mux16 = true;
|
||||
if (arg.size() > 6) {
|
||||
if (arg[6] != '=') break;
|
||||
|
@ -703,7 +703,7 @@ struct MuxcoverPass : public Pass {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
if (arg.size() >= 6 && arg.substr(0,6) == "-dmux=") {
|
||||
if (arg.size() >= 6 && arg.compare(0,6,"-dmux=") == 0) {
|
||||
cost_dmux = atoi(arg.substr(6).c_str());
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue