summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:17 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:17 +0000
commitf6d4200f86e93828a4a58a957d6ae7d9d5497a86 (patch)
tree2d940ae42f1f273a19c2c33f2858feab9122d9c2 /src/network
parent0ea21523556a345d38933ee2dd6dcdca0ec08514 (diff)
downloadopenttd-f6d4200f86e93828a4a58a957d6ae7d9d5497a86.tar.xz
(svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_chat_gui.cpp1
-rw-r--r--src/network/network_content_gui.cpp1
-rw-r--r--src/network/network_gui.cpp7
3 files changed, 2 insertions, 7 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index 2e0be50ba..af5782037 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -302,7 +302,6 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
this->cancel_button = WID_NC_CLOSE;
this->ok_button = WID_NC_SENDBUTTON;
this->afilter = CS_ALPHANUMERAL;
- this->text.Initialize(this->edit_str_buf, this->edit_str_size);
static const StringID chat_captions[] = {
STR_NETWORK_CHAT_ALL_CAPTION,
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 0df8f8f99..5aa4818f5 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -417,7 +417,6 @@ public:
this->GetWidget<NWidgetStacked>(WID_NCL_SEL_ALL_UPDATE)->SetDisplayedPlane(select_all);
this->afilter = CS_ALPHANUMERAL;
- this->text.Initialize(this->edit_str_buf, this->edit_str_size);
this->SetFocusedWidget(WID_NCL_FILTER);
_network_content_client.AddCallback(this);
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index a88d28a26..b5e48c4b0 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -444,9 +444,8 @@ public:
this->vscroll = this->GetScrollbar(WID_NG_SCROLLBAR);
this->FinishInitNested(desc, WN_NETWORK_WINDOW_GAME);
- ttd_strlcpy(this->edit_str_buf, _settings_client.network.client_name, this->edit_str_size);
+ this->text.Assign(_settings_client.network.client_name);
this->afilter = CS_ALPHANUMERAL;
- this->text.Initialize(this->edit_str_buf, this->edit_str_size);
this->SetFocusedWidget(WID_NG_CLIENT);
this->last_joined = NetworkGameListAddItem(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port));
@@ -1006,10 +1005,9 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
{
this->InitNested(desc, WN_NETWORK_WINDOW_START);
- ttd_strlcpy(this->edit_str_buf, _settings_client.network.server_name, this->edit_str_size);
+ this->text.Assign(_settings_client.network.server_name);
this->afilter = CS_ALPHANUMERAL;
- this->text.Initialize(this->edit_str_buf, this->edit_str_size);
this->SetFocusedWidget(WID_NSS_GAMENAME);
}
@@ -2112,7 +2110,6 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow {
this->cancel_button = WID_NCP_CANCEL;
this->ok_button = WID_NCP_OK;
this->afilter = CS_ALPHANUMERAL;
- this->text.Initialize(this->edit_str_buf, this->edit_str_size);
this->SetFocusedWidget(WID_NCP_PASSWORD);
}