mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 12:18:42 +00:00
Revert "chore(judger): use stoi()
to convert string to int"
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit 722d8eb479
.
This commit is contained in:
parent
33779b1758
commit
5ce6490efb
@ -620,7 +620,7 @@ int conf_int(const string &key, const int &val) {
|
||||
if (config.count(key) == 0) {
|
||||
return val;
|
||||
}
|
||||
return stoi(config[key]);
|
||||
return atoi(config[key].c_str());
|
||||
}
|
||||
int conf_int(const string &key, int num, const int &val) {
|
||||
ostringstream sout;
|
||||
@ -628,7 +628,7 @@ int conf_int(const string &key, int num, const int &val) {
|
||||
if (config.count(sout.str()) == 0) {
|
||||
return conf_int(key, val);
|
||||
}
|
||||
return stoi(config[sout.str()]);
|
||||
return atoi(config[sout.str()].c_str());
|
||||
}
|
||||
int conf_int(const string &key) {
|
||||
return conf_int(key, 0);
|
||||
|
@ -488,7 +488,7 @@ int conf_int(const string &key, const int &val) {
|
||||
if (uconfig.count(key) == 0) {
|
||||
return val;
|
||||
}
|
||||
return stoi(uconfig[key]);
|
||||
return atoi(uconfig[key].c_str());
|
||||
}
|
||||
int conf_int(const string &key, int num, const int &val) {
|
||||
ostringstream sout;
|
||||
@ -496,7 +496,7 @@ int conf_int(const string &key, int num, const int &val) {
|
||||
if (uconfig.count(sout.str()) == 0) {
|
||||
return conf_int(key, val);
|
||||
}
|
||||
return stoi(uconfig[sout.str()]);
|
||||
return atoi(uconfig[sout.str()].c_str());
|
||||
}
|
||||
int conf_int(const string &key) {
|
||||
return conf_int(key, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user