diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2018-05-13 18:34:57 +0100 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2018-06-27 22:54:46 +0200 |
commit | 5f86e1a390b4aa9510d43f97251484ca67934f1c (patch) | |
tree | 8a9a74e4beeefb3ebe5585f0f10aac80d2ba078a /src/newgrf_object.cpp | |
parent | e1b9187e9b39ff2ce1982a8fbcb4f2a018662ce7 (diff) | |
download | openttd-5f86e1a390b4aa9510d43f97251484ca67934f1c.tar.xz |
Codechange: Silence -Wclass-memaccess warnings with GCC8
Diffstat (limited to 'src/newgrf_object.cpp')
-rw-r--r-- | src/newgrf_object.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 78bbc5244..40a966a16 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -96,7 +96,9 @@ uint ObjectSpec::Index() const void ResetObjects() { /* Clean the pool. */ - MemSetT(_object_specs, 0, lengthof(_object_specs)); + for (uint16 i = 0; i < NUM_OBJECTS; i++) { + _object_specs[i] = {}; + } /* And add our originals. */ MemCpyT(_object_specs, _original_objects, lengthof(_original_objects)); |