mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 15:37:59 +00:00
stoi -> atoi
This commit is contained in:
parent
ee7c970367
commit
48d0f99406
41 changed files with 121 additions and 121 deletions
|
@ -999,8 +999,8 @@ struct Abc9Pass : public Pass {
|
|||
size_t pos = arg.find_first_of(':');
|
||||
int lut_mode = 0, lut_mode2 = 0;
|
||||
if (pos != string::npos) {
|
||||
lut_mode = std::stoi(arg.substr(0, pos));
|
||||
lut_mode2 = std::stoi(arg.substr(pos+1));
|
||||
lut_mode = atoi(arg.substr(0, pos).c_str());
|
||||
lut_mode2 = atoi(arg.substr(pos+1).c_str());
|
||||
} else {
|
||||
pos = arg.find_first_of('.');
|
||||
if (pos != string::npos) {
|
||||
|
@ -1010,7 +1010,7 @@ struct Abc9Pass : public Pass {
|
|||
lut_file = std::string(pwd) + "/" + lut_file;
|
||||
}
|
||||
else {
|
||||
lut_mode = std::stoi(arg);
|
||||
lut_mode = atoi(arg.c_str());
|
||||
lut_mode2 = lut_mode;
|
||||
}
|
||||
}
|
||||
|
@ -1028,10 +1028,10 @@ struct Abc9Pass : public Pass {
|
|||
if (GetSize(parts) == 0 && !lut_costs.empty())
|
||||
lut_costs.push_back(lut_costs.back());
|
||||
else if (GetSize(parts) == 1)
|
||||
lut_costs.push_back(std::stoi(parts.at(0)));
|
||||
lut_costs.push_back(atoi(parts.at(0).c_str()));
|
||||
else if (GetSize(parts) == 2)
|
||||
while (GetSize(lut_costs) < std::stoi(parts.at(0)))
|
||||
lut_costs.push_back(std::stoi(parts.at(1)));
|
||||
while (GetSize(lut_costs) < atoi(parts.at(0).c_str()))
|
||||
lut_costs.push_back(atoi(parts.at(1).c_str()));
|
||||
else
|
||||
log_cmd_error("Invalid -luts syntax.\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue