summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:26 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:26 +0000
commit6e6d94a2d14a50ad93577a4b030f25f8b64986b1 (patch)
tree17083b427a8977d182654b30e59c59a368a7856f /src/town_gui.cpp
parent6653ac6b362cf88a6b77a4e8dd3c6926885c6b5f (diff)
downloadopenttd-6e6d94a2d14a50ad93577a4b030f25f8b64986b1.tar.xz
(svn r24740) -Codechange: Remove duplicate members from QueryStringBaseWindow and directly use QueryString.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index d34013eca..b029f0fa0 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -1006,7 +1006,7 @@ public:
if (!this->townnamevalid) {
this->text.DeleteAll();
} else {
- GetTownName(this->edit_str_buf, &this->params, this->townnameparts, &this->edit_str_buf[this->edit_str_size - 1]);
+ GetTownName(this->text.buf, &this->params, this->townnameparts, &this->text.buf[this->text.max_bytes - 1]);
this->text.UpdateSize();
}
UpdateOSKOriginalText(this, WID_TF_TOWN_NAME_EDITBOX);
@@ -1041,12 +1041,12 @@ public:
const char *name = NULL;
if (!this->townnamevalid) {
- name = this->edit_str_buf;
+ name = this->text.buf;
} else {
/* If user changed the name, send it */
char buf[MAX_LENGTH_TOWN_NAME_CHARS * MAX_CHAR_LENGTH];
GetTownName(buf, &this->params, this->townnameparts, lastof(buf));
- if (strcmp(buf, this->edit_str_buf) != 0) name = this->edit_str_buf;
+ if (strcmp(buf, this->text.buf) != 0) name = this->text.buf;
}
bool success = DoCommandP(tile, this->town_size | this->city << 2 | this->town_layout << 3 | random << 6,