mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 05:08:56 +00:00
Use std::stoi instead of atoi(<str>.c_str())
This commit is contained in:
parent
e38f40af5b
commit
c11ad24fd7
36 changed files with 109 additions and 109 deletions
|
@ -555,14 +555,14 @@ struct OptLutPass : public Pass {
|
|||
if (conn_tokens.size() != 2)
|
||||
log_cmd_error("Invalid format of -dlogic signal mapping.\n");
|
||||
IdString logic_port = "\\" + conn_tokens[0];
|
||||
int lut_input = atoi(conn_tokens[1].c_str());
|
||||
int lut_input = std::stoi(conn_tokens[1]);
|
||||
dlogic[type][lut_input] = logic_port;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-limit" && argidx + 1 < args.size())
|
||||
{
|
||||
limit = atoi(args[++argidx].c_str());
|
||||
limit = std::stoi(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -240,11 +240,11 @@ struct Pmux2ShiftxPass : public Pass {
|
|||
size_t argidx;
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
if (args[argidx] == "-min_density" && argidx+1 < args.size()) {
|
||||
min_density = atoi(args[++argidx].c_str());
|
||||
min_density = std::stoi(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-min_choices" && argidx+1 < args.size()) {
|
||||
min_choices = atoi(args[++argidx].c_str());
|
||||
min_choices = std::stoi(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-onehot" && argidx+1 < args.size() && args[argidx+1] == "ignore") {
|
||||
|
|
|
@ -1521,7 +1521,7 @@ struct SharePass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-limit" && argidx+1 < args.size()) {
|
||||
config.limit = atoi(args[++argidx].c_str());
|
||||
config.limit = std::stoi(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue