summaryrefslogtreecommitdiff
path: root/src/osk_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:21 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:21 +0000
commit6653ac6b362cf88a6b77a4e8dd3c6926885c6b5f (patch)
tree390b2ccf0ad8f69cd6682320ebdbcbdda0ae31ce /src/osk_gui.cpp
parentf6d4200f86e93828a4a58a957d6ae7d9d5497a86 (diff)
downloadopenttd-6653ac6b362cf88a6b77a4e8dd3c6926885c6b5f.tar.xz
(svn r24739) -Codechange: Simplify some code by using Textbuf::Assign.
Diffstat (limited to 'src/osk_gui.cpp')
-rw-r--r--src/osk_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp
index 800b5ef54..2200db05d 100644
--- a/src/osk_gui.cpp
+++ b/src/osk_gui.cpp
@@ -188,8 +188,7 @@ struct OskWindow : public Window {
/* Window gets deleted when the parent window removes itself. */
return;
} else { // or reset to original string
- strcpy(qs->text.buf, this->orig_str_buf);
- qs->text.UpdateSize();
+ qs->text.Assign(this->orig_str_buf);
qs->text.MovePos(WKC_END);
this->InvalidateParent();
delete this;