Codechange: return std::string_view for Textbuf::GetText()
This commit is contained in:
+4
-1
@@ -2112,7 +2112,10 @@ struct SavePresetWindow : public Window {
|
||||
|
||||
case WID_SVP_SAVE: {
|
||||
Window *w = FindWindowById(WC_GAME_OPTIONS, WN_GAME_OPTIONS_NEWGRF_STATE);
|
||||
if (w != nullptr && !StrEmpty(this->presetname_editbox.text.GetText())) w->OnQueryTextFinished(this->presetname_editbox.text.GetText());
|
||||
if (w != nullptr) {
|
||||
auto text = this->presetname_editbox.text.GetText();
|
||||
if (!text.empty()) w->OnQueryTextFinished(std::string{text});
|
||||
}
|
||||
this->Close();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user