Codechange: Use std::strto* variants everywhere (#10720)
This commit is contained in:
@@ -1766,7 +1766,7 @@ public:
|
||||
if (str == nullptr) return;
|
||||
/* Set a new company manager face number */
|
||||
if (!StrEmpty(str)) {
|
||||
this->face = strtoul(str, nullptr, 10);
|
||||
this->face = std::strtoul(str, nullptr, 10);
|
||||
ScaleAllCompanyManagerFaceBits(this->face);
|
||||
ShowErrorMessage(STR_FACE_FACECODE_SET, INVALID_STRING_ID, WL_INFO);
|
||||
this->UpdateData();
|
||||
@@ -2714,7 +2714,7 @@ struct CompanyWindow : Window
|
||||
default: NOT_REACHED();
|
||||
|
||||
case WID_C_GIVE_MONEY: {
|
||||
Money money = (Money)(strtoull(str, nullptr, 10) / _currency->rate);
|
||||
Money money = (Money)(std::strtoull(str, nullptr, 10) / _currency->rate);
|
||||
uint32 money_c = Clamp(ClampToI32(money), 0, 20000000); // Clamp between 20 million and 0
|
||||
|
||||
Command<CMD_GIVE_MONEY>::Post(STR_ERROR_CAN_T_GIVE_MONEY, money_c, (CompanyID)this->window_number);
|
||||
|
Reference in New Issue
Block a user