diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-06-29 19:58:30 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-09-30 14:00:06 +0100 |
commit | 71a3e83468e36613ffe53b4e1689d52062da7c80 (patch) | |
tree | 49635f491cfd19a94d9a7b9b3cbbe45342f1c23b /src/error_gui.cpp | |
parent | acf0242961bf68312a5d9887e58832304e1f45c5 (diff) | |
download | openttd-71a3e83468e36613ffe53b4e1689d52062da7c80.tar.xz |
Fix: GCC9's warnings about deprecated implicit assignment operators
Diffstat (limited to 'src/error_gui.cpp')
-rw-r--r-- | src/error_gui.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/error_gui.cpp b/src/error_gui.cpp index 1fa83db16..501ebb82f 100644 --- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -72,9 +72,11 @@ static WindowDesc _errmsg_face_desc( * Copy the given data into our instance. * @param data The data to copy. */ -ErrorMessageData::ErrorMessageData(const ErrorMessageData &data) +ErrorMessageData::ErrorMessageData(const ErrorMessageData &data) : + duration(data.duration), textref_stack_grffile(data.textref_stack_grffile), textref_stack_size(data.textref_stack_size), + summary_msg(data.summary_msg), detailed_msg(data.detailed_msg), position(data.position), face(data.face) { - *this = data; + memcpy(this->textref_stack, data.textref_stack, sizeof(this->textref_stack)); for (size_t i = 0; i < lengthof(this->strings); i++) { if (this->strings[i] != nullptr) { this->strings[i] = stredup(this->strings[i]); |