mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 18:02:37 +01:00
Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger.
This commit is contained in:
@@ -609,9 +609,11 @@ struct NewGRFInspectWindow : Window {
|
||||
|
||||
void OnQueryTextFinished(std::optional<std::string> str) override
|
||||
{
|
||||
if (!str.has_value() || str->empty()) return;
|
||||
if (!str.has_value()) return;
|
||||
|
||||
NewGRFInspectWindow::var60params[GetFeatureNum(this->window_number)][this->current_edit_param - 0x60] = std::strtol(str->c_str(), nullptr, 16);
|
||||
auto val = ParseInteger<int32_t>(*str);
|
||||
if (!val.has_value()) return;
|
||||
NewGRFInspectWindow::var60params[GetFeatureNum(this->window_number)][this->current_edit_param - 0x60] = *val;
|
||||
this->SetDirty();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user