aboutsummaryrefslogtreecommitdiffstats
path: root/passes/sat/sat.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 /passes/sat/sat.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 'passes/sat/sat.cc')
-rw-r--r--passes/sat/sat.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/passes/sat/sat.cc b/passes/sat/sat.cc
index e4654d835..847ca0e1d 100644
--- a/passes/sat/sat.cc
+++ b/passes/sat/sat.cc
@@ -1102,23 +1102,23 @@ struct SatPass : public Pass {
continue;
}
if (args[argidx] == "-timeout" && argidx+1 < args.size()) {
- timeout = atoi(args[++argidx].c_str());
+ timeout = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-max" && argidx+1 < args.size()) {
- loopcount = atoi(args[++argidx].c_str());
+ loopcount = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-maxsteps" && argidx+1 < args.size()) {
- maxsteps = atoi(args[++argidx].c_str());
+ maxsteps = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-initsteps" && argidx+1 < args.size()) {
- initsteps = atoi(args[++argidx].c_str());
+ initsteps = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-stepsize" && argidx+1 < args.size()) {
- stepsize = max(1, atoi(args[++argidx].c_str()));
+ stepsize = max(1, std::stoi(args[++argidx]));
continue;
}
if (args[argidx] == "-ignore_div_by_zero") {
@@ -1185,7 +1185,7 @@ struct SatPass : public Pass {
continue;
}
if (args[argidx] == "-tempinduct-skip" && argidx+1 < args.size()) {
- tempinduct_skip = atoi(args[++argidx].c_str());
+ tempinduct_skip = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-prove" && argidx+2 < args.size()) {
@@ -1206,39 +1206,39 @@ struct SatPass : public Pass {
continue;
}
if (args[argidx] == "-prove-skip" && argidx+1 < args.size()) {
- prove_skip = atoi(args[++argidx].c_str());
+ prove_skip = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-seq" && argidx+1 < args.size()) {
- seq_len = atoi(args[++argidx].c_str());
+ seq_len = std::stoi(args[++argidx]);
continue;
}
if (args[argidx] == "-set-at" && argidx+3 < args.size()) {
- int timestep = atoi(args[++argidx].c_str());
+ int timestep = std::stoi(args[++argidx]);
std::string lhs = args[++argidx];
std::string rhs = args[++argidx];
sets_at[timestep].push_back(std::pair<std::string, std::string>(lhs, rhs));
continue;
}
if (args[argidx] == "-unset-at" && argidx+2 < args.size()) {
- int timestep = atoi(args[++argidx].c_str());
+ int timestep = std::stoi(args[++argidx]);
unsets_at[timestep].push_back(args[++argidx]);
continue;
}
if (args[argidx] == "-set-def-at" && argidx+2 < args.size()) {
- int timestep = atoi(args[++argidx].c_str());
+ int timestep = std::stoi(args[++argidx]);
sets_def_at[timestep].push_back(args[++argidx]);
enable_undef = true;
continue;
}
if (args[argidx] == "-set-any-undef-at" && argidx+2 < args.size()) {
- int timestep = atoi(args[++argidx].c_str());
+ int timestep = std::stoi(args[++argidx]);
sets_any_undef_at[timestep].push_back(args[++argidx]);
enable_undef = true;
continue;
}
if (args[argidx] == "-set-all-undef-at" && argidx+2 < args.size()) {
- int timestep = atoi(args[++argidx].c_str());
+ int timestep = std::stoi(args[++argidx]);
sets_all_undef_at[timestep].push_back(args[++argidx]);
enable_undef = true;
continue;