mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 01:55:33 +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
|
@ -103,7 +103,7 @@ void parse_blif(RTLIL::Design *design, std::istream &f, std::string dff_name, bo
|
|||
|
||||
if (len > 0) {
|
||||
string num_str = wire_name.substr(i+1, len);
|
||||
int num = atoi(num_str.c_str()) & 0x0fffffff;
|
||||
int num = std::stoi(num_str) & 0x0fffffff;
|
||||
blif_maxnum = std::max(blif_maxnum, num);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -430,13 +430,13 @@ void parse_type_map(std::map<std::string, std::tuple<int, int, bool>> &type_map,
|
|||
goto next_type;
|
||||
|
||||
if (child->id == "bit_width")
|
||||
bit_width = atoi(child->value.c_str());
|
||||
bit_width = std::stoi(child->value);
|
||||
|
||||
if (child->id == "bit_from")
|
||||
bit_from = atoi(child->value.c_str());
|
||||
bit_from = std::stoi(child->value);
|
||||
|
||||
if (child->id == "bit_to")
|
||||
bit_to = atoi(child->value.c_str());
|
||||
bit_to = std::stoi(child->value);
|
||||
|
||||
if (child->id == "downto" && (child->value == "0" || child->value == "false" || child->value == "FALSE"))
|
||||
upto = true;
|
||||
|
|
|
@ -2244,7 +2244,7 @@ struct VerificPass : public Pass {
|
|||
continue;
|
||||
}
|
||||
if (args[argidx] == "-L" && argidx+1 < GetSize(args)) {
|
||||
verific_sva_fsm_limit = atoi(args[++argidx].c_str());
|
||||
verific_sva_fsm_limit = std::stoi(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-n") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue