3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-31 16:33:19 +00:00

Use std::stoi instead of atoi(<str>.c_str())

This commit is contained in:
Eddie Hung 2019-08-06 16:45:48 -07:00
parent e38f40af5b
commit c11ad24fd7
36 changed files with 109 additions and 109 deletions

View file

@ -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;