diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-06 16:45:48 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-06 16:45:48 -0700 |
commit | c11ad24fd7d961432cfdbca7497ba229d3b4f38d (patch) | |
tree | 5b6b9bdef66b60dd718fa7104765d38a1a21c8d9 /frontends/liberty/liberty.cc | |
parent | e38f40af5b7cdd5c8b896ffba17069bd65f01f29 (diff) | |
download | yosys-c11ad24fd7d961432cfdbca7497ba229d3b4f38d.tar.gz yosys-c11ad24fd7d961432cfdbca7497ba229d3b4f38d.tar.bz2 yosys-c11ad24fd7d961432cfdbca7497ba229d3b4f38d.zip |
Use std::stoi instead of atoi(<str>.c_str())
Diffstat (limited to 'frontends/liberty/liberty.cc')
-rw-r--r-- | frontends/liberty/liberty.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontends/liberty/liberty.cc b/frontends/liberty/liberty.cc index 14de95e07..a6a65fdd8 100644 --- a/frontends/liberty/liberty.cc +++ b/frontends/liberty/liberty.cc @@ -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; |