diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-07 11:09:17 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-07 11:09:17 -0700 |
commit | 48d0f994064557dc0832748e17133ee2eac88cbf (patch) | |
tree | ff80fabc1b2196356dd3ebf0536b2d75e145282d /passes/hierarchy/hierarchy.cc | |
parent | ee7c970367c68fe1a02a237ed01f2845a03cf9b2 (diff) | |
download | yosys-48d0f994064557dc0832748e17133ee2eac88cbf.tar.gz yosys-48d0f994064557dc0832748e17133ee2eac88cbf.tar.bz2 yosys-48d0f994064557dc0832748e17133ee2eac88cbf.zip |
stoi -> atoi
Diffstat (limited to 'passes/hierarchy/hierarchy.cc')
-rw-r--r-- | passes/hierarchy/hierarchy.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc index 1319225ff..fd95b94b2 100644 --- a/passes/hierarchy/hierarchy.cc +++ b/passes/hierarchy/hierarchy.cc @@ -200,8 +200,8 @@ bool expand_module(RTLIL::Design *design, RTLIL::Module *module, bool flag_check int pos_idx = pos[0]; int pos_num = pos[1]; int pos_type = pos[2]; - int idx = std::stoi(cell->type.substr(pos_idx + 1, pos_num)); - int num = std::stoi(cell->type.substr(pos_num + 1, pos_type)); + int idx = atoi(cell->type.substr(pos_idx + 1, pos_num).c_str()); + int num = atoi(cell->type.substr(pos_num + 1, pos_type).c_str()); array_cells[cell] = std::pair<int, int>(idx, num); cell->type = cell->type.substr(pos_type + 1); } @@ -423,7 +423,7 @@ bool expand_module(RTLIL::Design *design, RTLIL::Module *module, bool flag_check int conn_size = conn.second.size(); RTLIL::IdString portname = conn.first; if (portname.begins_with("$")) { - int port_id = std::stoi(portname.substr(1)); + int port_id = atoi(portname.substr(1).c_str()); for (auto &wire_it : mod->wires_) if (wire_it.second->port_id == port_id) { portname = wire_it.first; |