Codechange: use std::optional<std::string> over char * for text query results
This commit is contained in:
@@ -2134,11 +2134,11 @@ struct StationViewWindow : public Window {
|
||||
}
|
||||
}
|
||||
|
||||
void OnQueryTextFinished(char *str) override
|
||||
void OnQueryTextFinished(std::optional<std::string> str) override
|
||||
{
|
||||
if (str == nullptr) return;
|
||||
if (!str.has_value()) return;
|
||||
|
||||
Command<CMD_RENAME_STATION>::Post(STR_ERROR_CAN_T_RENAME_STATION, this->window_number, str);
|
||||
Command<CMD_RENAME_STATION>::Post(STR_ERROR_CAN_T_RENAME_STATION, this->window_number, *str);
|
||||
}
|
||||
|
||||
void OnResize() override
|
||||
|
||||
Reference in New Issue
Block a user