aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-06 16:45:48 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-06 16:45:48 -0700
commitc11ad24fd7d961432cfdbca7497ba229d3b4f38d (patch)
tree5b6b9bdef66b60dd718fa7104765d38a1a21c8d9 /kernel/rtlil.cc
parente38f40af5b7cdd5c8b896ffba17069bd65f01f29 (diff)
downloadyosys-c11ad24fd7d961432cfdbca7497ba229d3b4f38d.tar.gz
yosys-c11ad24fd7d961432cfdbca7497ba229d3b4f38d.tar.bz2
yosys-c11ad24fd7d961432cfdbca7497ba229d3b4f38d.zip
Use std::stoi instead of atoi(<str>.c_str())
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index e770d4b4b..0c7216520 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -3921,14 +3921,14 @@ bool RTLIL::SigSpec::parse(RTLIL::SigSpec &sig, RTLIL::Module *module, std::stri
sigspec_parse_split(index_tokens, indices.substr(1, indices.size()-2), ':');
if (index_tokens.size() == 1) {
cover("kernel.rtlil.sigspec.parse.bit_sel");
- int a = atoi(index_tokens.at(0).c_str());
+ int a = std::stoi(index_tokens.at(0));
if (a < 0 || a >= wire->width)
return false;
sig.append(RTLIL::SigSpec(wire, a));
} else {
cover("kernel.rtlil.sigspec.parse.part_sel");
- int a = atoi(index_tokens.at(0).c_str());
- int b = atoi(index_tokens.at(1).c_str());
+ int a = std::stoi(index_tokens.at(0));
+ int b = std::stoi(index_tokens.at(1));
if (a > b) {
int tmp = a;
a = b, b = tmp;