summaryrefslogtreecommitdiff
path: root/src/fios_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2016-09-04 12:58:04 +0000
committeralberth <alberth@openttd.org>2016-09-04 12:58:04 +0000
commit6f201ce4a8db0143ba0664aabdd04dc733adc243 (patch)
treea368495e00682bf58a0270ab1fe63d79e934a530 /src/fios_gui.cpp
parent597380e099688652e31fd1f406b53dee6b65da90 (diff)
downloadopenttd-6f201ce4a8db0143ba0664aabdd04dc733adc243.tar.xz
(svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload.
Diffstat (limited to 'src/fios_gui.cpp')
-rw-r--r--src/fios_gui.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 0c09f96ab..a0f0f1b29 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -537,9 +537,8 @@ public:
if (this->selected != NULL && !_load_check_data.HasErrors()) {
const char *name = FiosBrowseTo(this->selected);
_file_to_saveload.SetMode(this->selected->type);
-
- strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name));
- strecpy(_file_to_saveload.title, this->selected->title, lastof(_file_to_saveload.title));
+ _file_to_saveload.SetName(name);
+ _file_to_saveload.SetTitle(this->selected->title);
if (this->abstract_filetype == FT_HEIGHTMAP) {
delete this;
@@ -602,8 +601,8 @@ public:
} else {
assert(this->abstract_filetype == FT_HEIGHTMAP);
_file_to_saveload.SetMode(file->type);
- strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name));
- strecpy(_file_to_saveload.title, file->title, lastof(_file_to_saveload.title));
+ _file_to_saveload.SetName(name);
+ _file_to_saveload.SetTitle(file->title);
delete this;
ShowHeightmapLoad();