1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 20:24:12 +01:00

Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf

This commit is contained in:
Rubidium
2025-01-16 20:44:29 +01:00
committed by rubidium42
parent 55fa14cb06
commit 4b2051a1c1
17 changed files with 43 additions and 43 deletions

View File

@@ -228,7 +228,7 @@ protected:
/* Apply the filter condition immediately, if a search string has been provided. */
StringFilter sf;
sf.SetFilterTerm(this->filter_editbox.text.buf);
sf.SetFilterTerm(this->filter_editbox.text.GetText());
if (!sf.IsEmpty()) {
this->servers.SetFilterState(true);
@@ -837,7 +837,7 @@ public:
case WID_NG_CLIENT:
/* Validation of the name will happen once the user tries to join or start a game, as getting
* error messages while typing (e.g. when you clear the name) defeats the purpose of the check. */
_settings_client.network.client_name = this->name_editbox.text.buf;
_settings_client.network.client_name = this->name_editbox.text.GetText();
break;
}
}
@@ -1129,7 +1129,7 @@ struct NetworkStartServerWindow : public Window {
bool CheckServerName()
{
std::string str = this->name_editbox.text.buf;
std::string str = this->name_editbox.text.GetText();
if (!NetworkValidateServerName(str)) return false;
SetSettingValue(GetSettingFromName("network.server_name")->AsStringSetting(), str);